Net::SSLeay::OO::Functions - convert Net::SSLeay functions to methods


Net-SSLeay-OO documentation  | view source Contained in the Net-SSLeay-OO distribution.

Index


NAME

Top

Net::SSLeay::OO::Functions - convert Net::SSLeay functions to methods

SYNOPSIS

Top

 use Net::SSLeay::OO::Functions 'foo';

 # means, roughly:
 use Net::SSLeay::OO::Functions sub {
         my $code = shift;
         sub {
             my $self = shift;
             $code->($self->foo, @_);
         }
     };

DESCRIPTION

Top

This internal utility module distributes Net::SSLeay functions into the calling package. Its import method takes a callback which should return a callback to be assigned into the symbol table; not providing that will mean that the Net::SSLeay function is directly assigned into the symbol table of the calling namespace.

If a function is passed instead of a closure, it is taken to be the name of an attribute which refers to where the Net::SSLeay magic pointer is kept.

The difference between the version of the installed handler function and the actual installed function is that the real one checks for OpenSSL errors which were raised while the function was called.

After the first argument, options may be passed:

-exclude = [qw(func1 func2)]>

Specify NOT to include some functions that otherwise would be; perhaps they won't work, perhaps they are badly named for their argument types.

-include = { func_name => 'method_name'}>

Import the Net::SSLeay function called func_name, as the local method method_name. This is mostly useful for functions which were missing their prefix indicating the argument types.

AUTHOR

Top

Sam Vilain, samv@cpan.org

COPYRIGHT

Top

SEE ALSO

Top

Net::SSLeay::OO


Net-SSLeay-OO documentation  | view source Contained in the Net-SSLeay-OO distribution.