Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

RE: -c

by Maqs (Deacon)
on May 09, 2000 at 13:40 UTC ( #10733=note: print w/replies, xml ) Need Help??


in reply to -c

In my humble opinion you can check the existance of a subroutine
or anything else verifying the symbol table of the given routine
in a way it is described in Programming Perl book (5.1.1. Symbol
tables)
.
i.e.:
#!/usr/bin/perl
&greet;

sub greet () {#some stuff here
};
foreach $symname (sort keys %main::) {
local *sym = $main::{$symname};
print "\&$symname is defined\n" if defined &sym;
}
----
This code will print out: "&greet is defined". You see, you can modufy that code to meet your taste. But the main
problem is that I didn't tested it with the incapsulated packages.

--
With best regards
Maqs.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://10733]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2016-12-10 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (159 votes). Check out past polls.