in reply to Re: Handling cascading defaults
in thread Handling cascading defaults
I would actually organize that slightly differently:
And then in other code you would do this:package Err; sub new { return bless {}, shift; } sub err { my $self = shift; my %args = @_; # Do something with %args here }
$handler ||= new Err; # time passes &do_right_thing() or $handler->err(title=>'Oops',msg=>'something went +wrong');
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE (tilly) 2: Handling cascading defaults
by merlyn (Sage) on Aug 19, 2000 at 19:31 UTC | |
by tilly (Archbishop) on Aug 19, 2000 at 19:44 UTC |
In Section
Seekers of Perl Wisdom