Module-Extract-Use-1.04/000755 000765 000024 00000000000 12261767075 015300 5ustar00brianstaff000000 000000 Module-Extract-Use-1.04/Changes000644 000765 000024 00000002461 12261767074 016575 0ustar00brianstaff000000 000000 # Changes for Module::Extract::Use 1.04 - Sat Jan 4 06:19:01 2014 * Get rid of MYMETA * Update test data structures for latest behavior 1.03 - Thu Aug 2 11:40:34 2012 * Note the "pragma" field in the module details (RT 78728) 1.02 - Tue Nov 1 11:02:58 2011 * Adjusted no_index. No code changes. 1.01 - Wed Mar 30 22:28:30 2011 * Promote to a stable version * Some files moved around, and I updated the copyright statements for downstream ease. 0.18 - Mon Mar 21 22:15:34 2011 Implemented get_modules_with_details to extract the version and import lists for a use(). 0.16 - Wed Jun 10 00:21:12 2009 * Small distro cleanups and new META_MERGE hotness. No need to upgrade. 0.15 - Sun May 31 23:35:10 2009 * Debian wants the man pages, so I guess I'll make them after all 0.14 - Wed May 20 07:07:56 2009 * Adjust PPI bits to look for 'require' bits too * Add extract_modules example from Jonathan Yu 0.13 - Wed Oct 29 14:15:51 2008 * Only return unique elements, so remove the duplicates from the return list 0.12 - Wed Oct 29 02:40:08 2008 * No more carping. Check the value of $object->error after a call to see if anything bad happened. 0.11 - Tue Oct 28 17:25:54 2008 * Bump to a release version 0.10_01 - Fri Aug 15 16:09:15 2008 * First release of a module to pull out the package names Module-Extract-Use-1.04/corpus/000755 000765 000024 00000000000 12261767075 016613 5ustar00brianstaff000000 000000 Module-Extract-Use-1.04/examples/000755 000765 000024 00000000000 12261767075 017116 5ustar00brianstaff000000 000000 Module-Extract-Use-1.04/lib/000755 000765 000024 00000000000 12261767075 016046 5ustar00brianstaff000000 000000 Module-Extract-Use-1.04/LICENSE000644 000765 000024 00000000105 12261767074 016300 0ustar00brianstaff000000 000000 You can use Module::Extract::Use under the same terms as Perl itself.Module-Extract-Use-1.04/Makefile.PL000644 000765 000024 00000001532 12261767074 017252 0ustar00brianstaff000000 000000 use ExtUtils::MakeMaker 6.48; require 5.008; eval "use Test::Manifest 1.21"; WriteMakefile( 'NAME' => 'Module::Extract::Use', 'ABSTRACT' => 'Extract the modules that a modules uses', 'VERSION_FROM' => 'lib/Module/Extract/Use.pm', 'LICENSE' => 'perl', 'AUTHOR' => 'brian d foy ', 'PREREQ_PM' => { 'PPI' => '0', 'Test::More' => '0', 'Test::Output' => '0', }, META_MERGE => { resources => { repository => { type => 'git', url => 'git@github.com:briandfoy/module-extract-use.git', web => 'https://github.com/briandfoy/module-extract-use', }, }, keywords => [ qw( ppi parsing static-analysis modules ) ], no_index => { dir => [ qw(corpus) ], directory => [ qw(corpus) ], }, }, clean => { FILES => q|Module-Extract-Use-*| }, ); Module-Extract-Use-1.04/MANIFEST000644 000765 000024 00000000751 12261767075 016434 0ustar00brianstaff000000 000000 Changes corpus/PackageImports.pm corpus/PackageVersion.pm corpus/Repeated.pm corpus/RT79273.pm examples/extract_modules lib/Module/Extract/Use.pm LICENSE Makefile.PL MANIFEST This list of files MANIFEST.SKIP README t/get_modules.t t/imports.t t/load.t t/pod.t t/pod_coverage.t t/rt/79273.t t/test_manifest t/versions.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Module-Extract-Use-1.04/MANIFEST.SKIP000644 000765 000024 00000002011 12261767074 017167 0ustar00brianstaff000000 000000 #!start included /usr/local/perls/perl-5.18.1/lib/5.18.1/ExtUtils/MANIFEST.SKIP # Avoid version control files. \bRCS\b \bCVS\b \bSCCS\b ,v$ \B\.svn\b \B\.git\b \B\.gitignore\b \b_darcs\b \B\.cvsignore$ # Avoid VMS specific MakeMaker generated files \bDescrip.MMS$ \bDESCRIP.MMS$ \bdescrip.mms$ # Avoid Makemaker generated and utility files. \bMANIFEST\.bak \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib\.ts$ \bpm_to_blib$ \bblibdirs\.ts$ # 6.18 through 6.25 generated this # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ \bBuild.bat$ \bBuild.COM$ \bBUILD.COM$ \bbuild.com$ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ \.tmp$ \.# \.rej$ # Avoid OS-specific files/dirs # Mac OSX metadata \B\.DS_Store # Mac OSX SMB mount metadata files \B\._ # Avoid Devel::Cover and Devel::CoverX::Covered files. \bcover_db\b \bcovered\b # Avoid MYMETA files ^MYMETA\. #!end included /usr/local/perls/perl-5.18.1/lib/5.18.1/ExtUtils/MANIFEST.SKIP \.travis\.yml \.releaserc \.lwpcookies Module-.* Module-Extract-Use-1.04/META.json000664 000765 000024 00000002023 12261767075 016720 0ustar00brianstaff000000 000000 { "abstract" : "Extract the modules that a modules uses", "author" : [ "brian d foy " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150", "keywords" : [ "ppi", "parsing", "static-analysis", "modules" ], "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Module-Extract-Use", "no_index" : { "directory" : [ "corpus" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : 0 } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : 0 } }, "runtime" : { "requires" : { "PPI" : 0, "Test::More" : 0, "Test::Output" : 0 } } }, "release_status" : "stable", "resources" : {}, "version" : "1.04" } Module-Extract-Use-1.04/META.yml000664 000765 000024 00000001127 12261767075 016554 0ustar00brianstaff000000 000000 --- abstract: 'Extract the modules that a modules uses' author: - 'brian d foy ' build_requires: ExtUtils::MakeMaker: 0 configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150' keywords: - ppi - parsing - static-analysis - modules license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Module-Extract-Use no_index: directory: - corpus requires: PPI: 0 Test::More: 0 Test::Output: 0 resources: {} version: 1.04 Module-Extract-Use-1.04/README000644 000765 000024 00000000735 12261767074 016164 0ustar00brianstaff000000 000000 You can install this using in the usual Perl fashion perl Makefile.PL make make test make install The documentation is in the module file. Once you install the file, you can read it with perldoc. perldoc Module::Extract::Use If you want to read it before you install it, you can use perldoc directly on the module file. perldoc lib/Use.pm This module is Github http://github.com/briandfoy/module-extract-use/tree/master Enjoy, brian d foy, bdfoy@cpan.org Module-Extract-Use-1.04/t/000755 000765 000024 00000000000 12261767075 015543 5ustar00brianstaff000000 000000 Module-Extract-Use-1.04/t/get_modules.t000644 000765 000024 00000002722 12261767074 020241 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use Test::More tests => 16; use File::Basename; use File::Spec::Functions qw(catfile); my $class = "Module::Extract::Use"; use_ok( $class ); my $extor = $class->new; isa_ok( $extor, $class ); can_ok( $extor, 'get_modules' ); # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Try it with a file that doesn't exist, should fail { my $not_there = 'not_there'; ok( ! -e $not_there, "Missing file is actually missing" ); $extor->get_modules( $not_there ); like( $extor->error, qr/does not exist/, "Missing file give right error" ); } # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Try it with this file { my $test = $0; ok( -e $test, "Test file is there" ); my %modules = map { $_, 1 } $extor->get_modules( $test ); ok( ! $extor->error, "No error for parseable file [$test]"); foreach my $module ( qw(Test::More File::Basename File::Spec::Functions strict) ) { ok( exists $modules{$module}, "Found $module" ); } foreach my $module ( qw(Foo Bar::Baz) ) { ok( ! exists $modules{$module}, "Didn't find $module" ); } } # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Try it with a file that has repeated use lines # I should only get unique names { my $file = catfile( qw(corpus Repeated.pm) ); ok( -e $file, "Test file [$file] is there" ); my @modules = sort { $a cmp $b } $extor->get_modules( $file ); is( scalar @modules, 3 ); is_deeply( \@modules, [qw(constant strict warnings)] ); } Module-Extract-Use-1.04/t/imports.t000755 000765 000024 00000006671 12261767074 017441 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use Test::More tests => 6; use File::Basename; use File::Spec::Functions qw(catfile); my $class = "Module::Extract::Use"; use_ok( $class ); my $extor = $class->new; isa_ok( $extor, $class ); can_ok( $extor, 'get_modules_with_details' ); # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Try it with a file that has repeated use lines # I should only get unique names { my $file = catfile( qw(corpus PackageImports.pm) ); ok( -e $file, "Test file [$file] is there" ); my $details = $extor->get_modules_with_details( $file ); is( scalar @$details, 10, 'There are the right number of hits' ); #diag( Dumper( $details ) ); use Data::Dumper; is_deeply( $details, expected(), 'The data structures match' ); } sub expected { return [ { 'pragma' => '', 'version' => undef, 'imports' => [], 'module' => 'URI', 'content' => 'use URI;', }, { 'content' => 'use CGI qw(:standard);', 'pragma' => '', 'version' => undef, 'imports' => [ ':standard' ], 'module' => 'CGI' }, { 'content' => 'use LWP::Simple 1.23 qw(getstore);', 'pragma' => '', 'version' => '1.23', 'imports' => [ 'getstore' ], 'module' => 'LWP::Simple' }, { 'content' => 'use File::Basename (\'basename\', \'dirname\');', 'pragma' => '', 'version' => undef, 'imports' => [ 'basename', 'dirname' ], 'module' => 'File::Basename' }, { 'content' => 'use File::Spec::Functions qw(catfile rel2abs);', 'pragma' => '', 'version' => undef, 'imports' => [ 'catfile', 'rel2abs' ], 'module' => 'File::Spec::Functions' }, { 'content' => 'use autodie \':open\';', 'pragma' => 'autodie', 'version' => undef, 'imports' => [ ':open' ], 'module' => 'autodie' }, { 'content' => 'use strict q\'refs\';', 'pragma' => 'strict', 'version' => undef, 'imports' => [ 'refs' ], 'module' => 'strict' }, { 'content' => 'use warnings q;', 'pragma' => 'warnings', 'version' => undef, 'imports' => [ 'redefine' ], 'module' => 'warnings' }, { 'content' => 'use Buster "brush";', 'pragma' => '', 'version' => undef, 'imports' => [ 'brush' ], 'module' => 'Buster' }, { 'content' => 'use Mimi qq{string};', 'pragma' => '', 'version' => undef, 'imports' => [ 'string' ], 'module' => 'Mimi' } ]; } Module-Extract-Use-1.04/t/load.t000644 000765 000024 00000000306 12261767074 016645 0ustar00brianstaff000000 000000 BEGIN { @classes = qw(Module::Extract::Use); } use Test::More tests => scalar @classes; foreach my $class ( @classes ) { print "Bail out! $class did not compile\n" unless use_ok( $class ); } Module-Extract-Use-1.04/t/pod.t000644 000765 000024 00000000201 12261767074 016502 0ustar00brianstaff000000 000000 use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); Module-Extract-Use-1.04/t/pod_coverage.t000644 000765 000024 00000000271 12261767074 020364 0ustar00brianstaff000000 000000 use Test::More; eval "use Test::Pod::Coverage 1.00"; plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@; all_pod_coverage_ok(); Module-Extract-Use-1.04/t/rt/000755 000765 000024 00000000000 12261767075 016170 5ustar00brianstaff000000 000000 Module-Extract-Use-1.04/t/test_manifest000644 000765 000024 00000000112 12261767074 020324 0ustar00brianstaff000000 000000 load.t pod.t pod_coverage.t get_modules.t imports.t versions.t rt/79273.t Module-Extract-Use-1.04/t/versions.t000755 000765 000024 00000002645 12261767074 017611 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use Test::More tests => 6; use File::Basename; use File::Spec::Functions qw(catfile); my $class = "Module::Extract::Use"; use_ok( $class ); my $extor = $class->new; isa_ok( $extor, $class ); can_ok( $extor, 'get_modules_with_details' ); # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Try it with a file that has repeated use lines # I should only get unique names { my $file = catfile( qw(corpus PackageVersion.pm) ); ok( -e $file, "Test file [$file] is there" ); my $details = $extor->get_modules_with_details( $file ); is( scalar @$details, 3 ); #diag( Dumper( $details ) ); use Data::Dumper; is_deeply( $details, expected() ); print Dumper( $details ), "\n"; use Data::Dumper; } sub expected { return [ { 'content' => 'use HTTP::Size 1.23;', 'pragma' => '', 'version' => '1.23', 'imports' => [], 'module' => 'HTTP::Size' }, { 'content' => 'use YAML::Syck 1.54 qw(LoadFile);', 'pragma' => '', 'version' => '1.54', 'imports' => [ qw(LoadFile) ], 'module' => 'YAML::Syck' }, { 'content' => 'use LWP::Simple 6.1 qw(getstore);', 'pragma' => '', 'version' => '6.1', 'imports' => [ qw(getstore) ], 'module' => 'LWP::Simple' } ]; } Module-Extract-Use-1.04/t/rt/79273.t000755 000765 000024 00000002237 12261767074 017056 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use Test::More tests => 6; use File::Basename; use File::Spec::Functions qw(catfile); my $class = "Module::Extract::Use"; use_ok( $class ); my $extor = $class->new; isa_ok( $extor, $class ); can_ok( $extor, 'get_modules_with_details' ); # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Try it with a file that has repeated use lines # I should only get unique names { my $file = catfile( qw(corpus RT79273.pm) ); ok( -e $file, "Test file [$file] is there" ); my $details = $extor->get_modules_with_details( $file ); is( scalar @$details, 2, 'There are the right number of hits' ); is_deeply( $details, expected(), 'The data structures match' ); } sub expected { return [ { 'content' => 'use parent \'CGI::Snapp\';', 'pragma' => 'parent', 'version' => undef, 'imports' => [qw(CGI::Snapp)], 'module' => 'parent' }, { 'content' => 'use Capture::Tiny \'capture\';', 'pragma' => '', 'version' => undef, 'imports' => [qw(capture)], 'module' => 'Capture::Tiny' }, ]; } Module-Extract-Use-1.04/lib/Module/000755 000765 000024 00000000000 12261767075 017273 5ustar00brianstaff000000 000000 Module-Extract-Use-1.04/lib/Module/Extract/000755 000765 000024 00000000000 12261767075 020705 5ustar00brianstaff000000 000000 Module-Extract-Use-1.04/lib/Module/Extract/Use.pm000644 000765 000024 00000011357 12261767074 022005 0ustar00brianstaff000000 000000 package Module::Extract::Use; use strict; use warnings; no warnings; use subs qw(); use vars qw($VERSION); $VERSION = '1.04'; =head1 NAME Module::Extract::Use - Pull out the modules a module explicitly uses =head1 SYNOPSIS use Module::Extract::Use; my $extor = Module::Extract::Use->new; my @modules = $extor->get_modules( $file ); if( $extor->error ) { ... } my $details = $extor->get_modules_with_details( $file ); foreach my $detail ( @$details ) { printf "%s %s imports %s\n", $detail->module, $detail->version, join ' ', @{ $detail->imports } } =head1 DESCRIPTION Extract the names of the modules used in a file using a static analysis. Since this module does not run code, it cannot find dynamic uses of modules, such as C. It only reports modules that the file loads directly. Modules loaded with C or C, for instance, will will be in the import list for those pragmas but won't have separate entries in the data this module returns. =cut =over 4 =item new Makes an object. The object doesn't do anything just yet, but you need it to call the methods. =cut sub new { my $class = shift; my $self = bless {}, $class; $self->init; $self; } =item init Set up the object. You shouldn't need to call this yourself. =cut sub init { $_[0]->_clear_error; } =item get_modules( FILE ) Returns a list of namespaces explicity use-d in FILE. Returns undef if the file does not exist or if it can't parse the file. Each used namespace is only in the list even if it is used multiple times in the file. The order of the list does not correspond to anything so don't use the order to infer anything. =cut sub get_modules { my( $self, $file ) = @_; $self->_clear_error; my $details = $self->get_modules_with_details( $file ); return unless defined $details; my @modules = map { $_->{module} } @$details; } =item get_modules_with_details( FILE ) Returns a list of hash references, one reference for each namespace explicitly use-d in FILE. Each reference has keys for: namespace - the namespace, always defined version - defined if a module version was specified imports - an array reference to the import list pragma - true if the module thinks this namespace is a pragma Each used namespace is only in the list even if it is used multiple times in the file. The order of the list does not correspond to anything so don't use the order to infer anything. =cut sub get_modules_with_details { my( $self, $file ) = @_; $self->_clear_error; my $modules = $self->_get_ppi_for_file( $file ); return unless defined $modules; $modules; } sub _get_ppi_for_file { my( $self, $file ) = @_; unless( -e $file ) { $self->_set_error( ref( $self ) . ": File [$file] does not exist!" ); return; } require PPI; my $Document = eval { PPI::Document->new( $file ) }; unless( $Document ) { $self->_set_error( ref( $self ) . ": Could not parse file [$file]" ); return; } my $modules = $Document->find( sub { $_[1]->isa( 'PPI::Statement::Include' ) && ( $_[1]->type eq 'use' || $_[1]->type eq 'require' ) } ); return unless $modules; my %Seen; my @modules = grep { ! $Seen{ $_->{module} }++ && $_->{module} } map { my $hash = bless { content => $_->content, pragma => $_->pragma, module => $_->module, imports => [ $self->_list_contents( $_->arguments ) ], version => eval{ $_->module_version->literal || ( undef ) }, }, 'Module::Extract::Use::Item'; } @$modules; return \@modules; } BEGIN { package Module::Extract::Use::Item; sub pragma { $_[0]->{pragma} } sub module { $_[0]->{module} } sub imports { $_[0]->{imports} } sub version { $_[0]->{version} } } sub _list_contents { my( $self, $node ) = @_; eval { if( ! defined $node ) { return; } elsif( $node->isa( 'PPI::Token::QuoteLike::Words' ) ) { ( $node->literal ) } elsif( $node->isa( 'PPI::Structure::List' ) ) { my $nodes = $node->find( sub{ $_[1]->isa( 'PPI::Token::Quote' ) } ); map { $_->string } @$nodes; } elsif( $node->isa( 'PPI::Token::Quote' ) ) { ( $node->string ); } }; } =item error Return the error from the last call to C. =cut sub _set_error { $_[0]->{error} = $_[1]; } sub _clear_error { $_[0]->{error} = '' } sub error { $_[0]->{error} } =back =head1 TO DO =over 4 =item * Make it recursive, so it scans the source for any module that it finds. =back =head1 SEE ALSO L =head1 SOURCE AVAILABILITY The source code is in Github: git://github.com/briandfoy/module-extract-use.git =head1 AUTHOR brian d foy, C<< >> =head1 COPYRIGHT AND LICENSE Copyright (c) 2008-2014, brian d foy, All Rights Reserved. You may redistribute this under the same terms as Perl itself. =cut 1; Module-Extract-Use-1.04/examples/extract_modules000644 000765 000024 00000004272 12261767074 022247 0ustar00brianstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Pod::Usage; =head1 NAME extract_modules - determine which Perl modules a given file uses =head1 VERSION Version 1.10 =cut our $VERSION = '1.10'; =head1 SYNOPSIS Use: extract_modules filename [...] Given Perl files, extract and report the Perl modules included with C or C. =head1 DESCRIPTION This script does not execute the code in the files it examines. It uses the C or C modules which statically analyze the source without compiling or running it. These modules cannot discover modules loaded dynamically through a a string eval. =cut # if no parameters are passed, give usage information unless( @ARGV ) { pod2usage( msg => 'Please supply at least one filename to analyze' ); exit; } my( $object, $method ); my @classes = qw( Module::Extract::Use Module::ExtractUse ); my %methods = qw( Module::Extract::Use get_modules Module::ExtractUse extract_use ); foreach my $module ( @classes ) { eval "require $module"; next if $@; ( $object, $method ) = ( $module->new, $methods{$module} ); } die "No usable file scanner module found; exiting...\n" unless defined $object; foreach my $file ( @ARGV ) { unless ( -r $file ) { printf STDERR "Could not read $file\n"; next; } dump_list( $file, sort $object->$method( $file ) ); } BEGIN { my $corelist = eval { require Module::CoreList }; sub dump_list { my( $file, @modules ) = @_; printf "Modules required by %s:\n", $file; my( $core, $extern ) = ( 0, 0 ); foreach my $module ( @modules ) { printf " - $module%s\n", $corelist ? do { my $v = Module::CoreList->first_release( $module ); $core++ if $v; $v ? " (first released with Perl $v)" : ''; } : do { $extern++; '' } } printf "%d module(s) in core, %d external module(s)\n\n", $core, $extern; } } =head1 AUTHORS Jonathan Yu C<< >> brian d foy C<< >> =head1 COPYRIGHT & LICENSE Copyright 2009 by brian d foy You can use this script under the same terms as Perl itself. =head1 SEE ALSO L, L, L, =cut Module-Extract-Use-1.04/corpus/PackageImports.pm000644 000765 000024 00000000443 12261767074 022062 0ustar00brianstaff000000 000000 use URI; use CGI qw(:standard); use LWP::Simple 1.23 qw(getstore); use File::Basename ('basename', 'dirname'); use File::Spec::Functions qw(catfile rel2abs); use autodie ':open'; use strict q'refs'; use warnings q; use Buster "brush"; use Mimi qq{string}; my $cat = 'Buster'; 1; Module-Extract-Use-1.04/corpus/PackageVersion.pm000644 000765 000024 00000000176 12261767074 022055 0ustar00brianstaff000000 000000 use HTTP::Size 1.23; use 5.013; use YAML::Syck 1.54 qw(LoadFile); use LWP::Simple 6.1 qw(getstore); my $cat = 'Buster'; 1; Module-Extract-Use-1.04/corpus/Repeated.pm000644 000765 000024 00000000253 12261767074 020701 0ustar00brianstaff000000 000000 package Local::Repeated; use strict; use warnings; no warnings; use warnings; use strict; use constant; package Foo; use warnings; { no strict; } use warnings; 1;Module-Extract-Use-1.04/corpus/RT79273.pm000644 000765 000024 00000000204 12261767074 020105 0ustar00brianstaff000000 000000 # https://rt.cpan.org/Ticket/Display.html?id=79273 package Controller; use parent 'CGI::Snapp'; use Capture::Tiny 'capture'; 1;