Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Perl Inheritance & module variables

by Anonymous Monk
on Sep 19, 2008 at 09:26 UTC ( #712489=note: print w/replies, xml ) Need Help??

in reply to Perl Inheritance & module variables

C:\>perl -MCGI -e"die CGI->VERSION" 3.38 at -e line 1. C:\>perl -MCarp -e"die Carp->VERSION" 1.04 at -e line 1. C:\>perl -Mstrict -e"die strict->VERSION" 1.03 at -e line 1. C:\>perldoc UNIVERSAL ... "VERSION ( [ REQUIRE ] )" "VERSION" will return the value of the variable $VERSION in the package the object is blessed into. If "REQUIRE" is given then it will do a comparison and die if the package version is not greate +r than or equal to "REQUIRE". "VERSION" can be called as either a class (static) method, an obj +ect method or a function.

Replies are listed 'Best First'.
Re^2: Perl Inheritance & module variables
by diabelek (Beadle) on Sep 19, 2008 at 16:04 UTC

    I saw that but I haven't been able to figure out how UNIVERSAL works. The reason I ask is because VERSION isn't the only variable I want. I would like to define several constants that UNIVERSAL doesn't appear to be able to grab except for VERSION. If it can, please send me docs that describe it.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2018-07-22 16:46 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (454 votes). Check out past polls.