HTTP-Promise

 view release on metacpan or  search on metacpan

lib/HTTP/Promise/IO.pm  view on Meta::CPAN

    if( CORE::ref( $self ) )
    {
        foreach( CORE::keys( %$hash ) )
        {
            $self->{ $_ } = CORE::delete( $hash->{ $_ } );
        }
        $new = $self;
    }
    else
    {
        $new = bless( $hash => $class );
    }
    if( CORE::exists( $hash->{stop_if_code} ) && 
        CORE::defined( $hash->{stop_if_code} ) && 
        CORE::length( $hash->{stop_if_code} ) )
    {
        my $code = CORE::delete( $hash->{stop_if_code} );
        my $saved = $@;
        # "if you want to eval the result, you should prepend "sub subname ", or "sub " for an anonymous function constructor."
        # <https://metacpan.org/pod/B::Deparse#coderef2text>
        my $ref;

lib/HTTP/Promise/Message.pm  view on Meta::CPAN

        # The headers object in HTTP::Promise::Message must be the same shared on in HTTP::Promise::Entity
        if( CORE::exists( $self->{entity} ) &&
            CORE::exists( $self->{entity}->{headers} ) )
        {
            $self->{entity}->{headers} = $self->{headers};
        }
        $new = $self;
    }
    else
    {
        $new = bless( $hash => $class );
    }
    CORE::return( $new );
}

# NOTE: only here to avoid triggering HTTP::Promise::Headers::STORABLE_thaw_post_processing which we inherit when we did 'require HTTP::Promise::Headers'
sub STORABLE_thaw_post_processing { CORE::return( $_[0] ); }

1;
# NOTE: POD
__END__



( run in 0.245 second using v1.01-cache-2.11-cpan-4ee56698ea0 )