Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Answer: Class::MethodMaker initialization of default values

by vishi83 (Pilgrim)
on Oct 22, 2005 at 14:32 UTC ( #502209=categorized answer: print w/replies, xml ) Need Help??

Q&A > object-oriented programming > Class::MethodMaker initialization of default values - Answer 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..

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-12-18 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (495 votes). Check out past polls.

    Notices?