in reply to [SOLVED] Subtle Q: what does 'Apache2::RequestRec' return for missing "param()"?
handles => { param => 'param', },
is effectively
handles => { param => sub { my $plack_request = shift->plack_request; return $pack_request->param(@_); }, },
So instead of using around, you could use
handles => { param => sub { my $plack_request = shift->plack_request; return (wantarray ? $plack_request->param(@_) : $plack_request->param(@_) // '' ); }, },
One less layers of subs, and less action at a distance.
|
|---|