in reply to Calling subroutine with a scalar
Try
my $res = new Some::Package({ foo => bar })->$sub;Or better:
my $res = Some::Package->new({ foo => bar })->$sub;
In Section
Seekers of Perl Wisdom
in reply to Calling subroutine with a scalar
Try
my $res = new Some::Package({ foo => bar })->$sub;Or better:
my $res = Some::Package->new({ foo => bar })->$sub;