Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2018-01-24 02:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (255 votes). Check out past polls.

    Notices?