
BillKSmith
Veteran
Jun 16, 2011, 4:15 AM
Post #2 of 3
(1273 views)
|
Re: [waltz] Class::InsideOut - set default attribute value
[In reply to]
|
Can't Post
|
|
The attriutes hashes in an "inside out" constructer are the same as ordinary variables in an ordinary (non OO) subroutine. If zero or '' are not valid values use:
$attribute{$object} = 'default' or @_[1]; else:
$attribute{$object} = defined @_[1] ? @_[1] : 'default'; Good Luck, Bill
|