AI-TensorFlow-Libtensorflow

 view release on metacpan or  search on metacpan

maint/process-capi.pl  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env perl
# PODNAME: gen-capi-docs
# ABSTRACT: Generates POD for C API docs
 
use strict;
 
use FindBin;
use lib "$FindBin::Bin/../lib";
use Sub::Uplevel; # place early to override caller()
 
        use Mu;
        use CLI::Osprey;
 
        use feature qw(say postderef);
        use Syntax::Construct qw(heredoc-indent);
        use Function::Parameters;

maint/process-capi.pl  view on Meta::CPAN

331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
        ro _attached_functions => ( default => sub { {} } );
 
        around attach => sub {
            my ($orig, $self, $name) = @_;
            my $real_name;
            wrap 'FFI::Platypus::DL::dlsym',
                post => sub { $real_name = $_[1] if $_[-1] };
            my $ret = uplevel 3, $orig, @_[1..$#_];
            push $self->_attached_functions->{$real_name}->@*, {
                    c        => $real_name,
                    package  => (caller(2))[0],
                    perl     => ref($name) ? $name->[1] : $name,
                    args     => $_[3],
                    return   => $_[4],
            };
            $ret;
        }
}
 
TF::CAPI::Extract->new_with_options->run;



( run in 0.369 second using v1.01-cache-2.11-cpan-95122f20152 )