in reply to Re^2: Ruby vs Perl vs LISP; the killer feature lacking in Ruby
in thread Ruby vs Perl vs LISP; the killer feature lacking in Ruby
As well as Jenda's suggestion, it's also possible to declare a little wrapper like this:
sub also (&;@) { return @_; }
Enabling you to do this:
multifoo { $_ * 2 } also { foo($_) } @things;
This is what Moose does for its type constraints system, providing little wrappers like via, where and message so you can write code like:
subtype 'ModernDateTime' => as 'DateTime' => where { $_->year() >= 1980 } => message { 'The date is not modern enough' };
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Meditations