in reply to Method Chaining and Accessors
I wonder if instead of
my $obj = My::Class->new()->foo("foo")->bar("bar");you couldn't do
my $obj = My::Class->new({ foo => 'foo', bar => 'bar'});That would make things a little more clear than trying to decipher the layers of arrows. And you could also punctuate it differently ..
my $obj = My::Class->new({ foo => 'foo', bar => 'bar' });
.. depending on your taste.
|
---|