[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Self Aware Data routines?



>From: Ronald J Kimball <rjk@linguist.dartmouth.edu>

>> |sub AUTOLOAD { 
>> |  print "Sorry, I don't see a subroutine called '$AUTOLOAD'\n";
>> |}
>>
>> And hope that __DATA__ doesn't contain the name of some unrelated sub
>> in main...
>>
>
> That concern is valid for the general exercise, not just this specific
> solution.  But under this exercise, there are no 'unrelated' subs.  The
> idea is simply to call the specified sub if it exists, and print an
> appropriate message if it doesn't.

(I am definitely a baby perl're :)

But would not using AUTOLOAD, which I had overlooked in my earlier post,
allow one to look at other name spaces and call those subroutines if they
exist?

?
-Sneex-  :]
FCCJ Data Security Group
______________________________________________________________________
Bill Jones  Data Security Specialist  http://www.fccj.org/cgi/mail?dss

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org