C-DynaLib
view release on metacpan or search on metacpan
lib/C/DynaLib.pm view on Meta::CPAN
my $glue_sub = ($is_method && eval { $self->can($glue_sub_name) })
|| (defined(&{"$glue_sub_name"}) && \&{"$glue_sub_name"});
if (! $glue_sub) {
carp "Unsupported calling convention: decl => '$convention'"
if $^W;
return undef;
}
my @pre_args = ($ptr, $ret_type, $libref);
my $pkg = caller();
# This 'inner' closure must be an eval-string in order to compile the
# function call in our caller's package.
my $proc = eval q/ sub {
package /.$pkg.q/;
&$glue_sub(@pre_args, map { pack($_, shift) } @arg_type);
}/;
return sub {
if ($^W) {
( run in 0.542 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )