- or download this
#!/usr/bin/perl
# file.pm
...
sub foo { 1 }
sub bar { 2 }
- or download this
#!/usr/bin/perl
# main script
...
print "file.pm: $sym\n" if defined *{'Query::'.$sym}{CODE};
print "file.pm: subref \$$sym\n" if ref ${*{'Query::'.$sym}{SCALAR}}
+ eq 'CODE';
}
- or download this
in package main
file.pm: sub bar
file.pm: subref $quux
file.pm: sub blorf
file.pm: sub foo