Sam Vilain > Net-SSLeay-OO-0.02 > Net::SSLeay::OO::Functions

Download:
Net-SSLeay-OO-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

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

SYNOPSIS ^

 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 ^

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 ^

Sam Vilain, samv@cpan.org

COPYRIGHT ^

Copyright (C) 2009 NZ Registry Services

This program is free software: you can redistribute it and/or modify it under the terms of the Artistic License 2.0 or later. You should have received a copy of the Artistic License the file COPYING.txt. If not, see <http://www.perlfoundation.org/artistic_license_2_0>

SEE ALSO ^

Net::SSLeay::OO

syntax highlighting: