Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2016-10-01 19:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (6 votes). Check out past polls.