1
2
3
XRef in program.pl
Object | Was imported as | Line (program.pl)
¶m | &CGI::param | 110, 221, 225, 301, 3877, 14322
1 2 3 4 5 6 7
use Devel::Symdump; my $obj = Devel::Symdump->rnew(); my @a = $obj->functions(); for my $i (@a) { print "$i\n"; } exit;
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/perl use warnings; use strict; use File::Find; use Devel::Symdump; my $obj = Devel::Symdump->new(); my @a = $obj->functions(); for my $i (@a) { print "$i\n"; }
1
2
3
4
5
6
7
8
9
10
11
File::Find::contract_name
File::Find::wrap_wanted
File::Find::_find_dir_symlnk
File::Find::find
File::Find::_find_dir
File::Find::is_tainted
File::Find::_find_opt
File::Find::PathCombine
File::Find::Follow_SymLink
File::Find::finddepth
File::Find::is_tainted_pp
perldoc B::XrefThe B::Xref module is used to generate a cross reference listing of all definitions and uses of variables, subroutines and formats in a Perl program. It is implemented as a backend for the Perl compiler.
QuotePS: -MO=Xref ist zu unübersichtlich
1 2 3 4 5 6 7 8 9
#! /usr/bin/env perl use strict; use warnings; use 5.010; use CGI qw( :all ); print header( "text/html" );
2018-09-19T16:03:38 LinuxerIch glaube zwar erkennen zu können, welche Routinen von CGI.pm exportiert werden;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
#!/usr/bin/perl use warnings; use strict; use CGI qw( :all ); print header( "text/html" ); use Devel::Symdump; sub funcNames { my @a = @_; my @b; my $i; my $rvar; my @c; for $i (@a) { @b = split(/::/, $i); $rvar = pop(@b); push(@c, $rvar); } return @c; } my $cgisym = Devel::Symdump->new("CGI"); my $mainsym = Devel::Symdump->new(); my @mainfuncs = $mainsym->functions(); my @cgifuncs = $cgisym->functions(); @mainfuncs = funcNames(@mainfuncs); @cgifuncs = funcNames(@cgifuncs); my $i; my $u; print "In mainspace from CGI:\n"; for $i (@mainfuncs) { for $u (@cgifuncs) { if ($i eq $u) { print "$i\n"; } next; } }
Linuxeraber ich habe keinen Bezug erkennen können, welche von denen nun auch wirklich benutzt wurde. Betonung liegt auf "Bezug erkennen".