While chaining is neato and all, I can't think of a good reason to support this use. What's wrong with simply passing a hash of configuration information to your constructor? This seems far more reasonable to me:
my $obj = My::Class->new( foo => 'foo', bar => 'bar' );
Under the hood, your constructor can either modify the object directly or call the accessors/mutators and let them do the work.
In reply to Re: Method Chaining and Accessors
by friedo
in thread Method Chaining and Accessors
by linenoise
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |