Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Devel::Declare type syntactic sugar for DBI select bind_col param

by tobyink (Abbot)
on Oct 01, 2012 at 12:37 UTC ( #996642=note: print w/ replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996642]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-09-22 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (178 votes), past polls