Am 26.05.2016 um 07:02 schrieb Aristotle Pagaltzis: > * Abigail <abigail@abigail.be> [2016-05-25 20:23]: >> It's only useful for people who don't want indirect object syntax in >> their programs, but somehow use it anyway. > > Just today I wrote this: > > my $href = html_escape URI->new_abs( '..', $selflink ); > > Except no, that doesn’t work, because Perl thought I meant this: > > my $href = URI->new_abs( '..', $selflink )->html_escape; > > Perl didn’t tell me (and why should it?), so I only found out when I ran > that code and it died for lack of a URI->html_escape method. A similar failure mode I've encountered in the past: use Test::More; ... like Some::Module->new(...)->as_string, qr/.../; Which parses as: Some::Class->like->new(...)->as_string, qr/.../; -- Lukas Mai <plokinom@gmail.com>Thread Previous | Thread Next