Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Answer: Class::MethodMaker initialization of default values

( #502209=categorized answer: print w/ replies, xml ) Need Help??

Q&A > object-oriented programming > Class::MethodMaker initialization of default values contributed by vishi83

Hi !!

i think this would be better , if you want to make b's value to be default ..

use constant SOMENAME ( a => 10, b=> 'DEFAULT');

The rest is yours.. the code you've given will work fine..

Comment on Answer: Class::MethodMaker initialization of default values
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-12-25 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls