Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- VERSION in UNIVERSAL alternative?
- John Bokma
April 6, 2010, 11:43 pm
rate this thread
I currently use an eval to obtain VERSION of the parent class . I noted
that UNIVERSAL has VERSION, however,
states that " import ... and VERSION ), however it is usually harmful to
do so. Please don't do this in new code.
So, what's the alternative / better solution (and why isn't this in the
documentation ;-) ).
 my $package = ref $self;
my $version = eval "$$::VERSION";
John Bokma j3b
Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development
- » FAQ 3.7 How do I cross-reference my Perl programs?
- — Previous thread in » PERL Discussions