http://www.perlmonks.org?node_id=996642


in reply to Devel::Declare type syntactic sugar for DBI select bind_col param

Just by subclassing DBI::db and using Perl::MethodCallWithBlock I believe you could achieve:

$dbh->SELECT( [qw( name email )], from => 'employees', where => { id => 42 }, ) { printf("%s <%s>\n", $_->name, $_->email); };
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
  • Comment on Re: Devel::Declare type syntactic sugar for DBI select bind_col param
  • Download Code