Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by Anonymous Monk
on Sep 30, 2012 at 11:44 UTC ( #996497=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    SELECT $dbh,
         ":name, :email from ... where DIAPER=?",
    ...
    {
        print "$name < $email >\n";
    }
    
  2. or download this
    SELECT $dbh,
         " :name, :email
    ...
    {
        print "$name < $email >\n";
    }
    
  3. or download this
    SELECT $dbh,
         ":name, :email from ... where DIAPER=?",
         'soft and absorbant'   {
        print "$name < $email >\n";
    }
    
  4. or download this
    SELECT $dbh,
         " :name, :email
    ...
         'soft and absorbant'   {
        print "$name < $email >\n";
    }
    
  5. or download this
    $dbh->SELECT
         ":name, :email from ... where DIAPER=?",
    ...
    {
        print "$name < $email >\n";
    }
    
  6. or download this
    $dbh->SELECT
         " :name, :email
    ...
    {
        print "$name < $email >\n";
    }
    
  7. or download this
    $dbh->SELECT(
         ":name, :email from ... where DIAPER=?",
    ...
    sub {
        print "$name < $email >\n";
    });
    
  8. or download this
    $dbh->SELECT(
         " :name, :email
    ...
    sub {
        print "$name < $email >\n";
    } );
    
  9. or download this
    
    for my $quality ( 'soft', 'absorbant' ){
    ...
            print "$rec{name} < $rec{email} >\n";
        }
    }
    
  10. or download this
    for my $quality ( 'soft', 'absorbant' ){
        SELECT ":{name}, :{email} from ... where DIAPER=?", $quality {
            print "$rec{name} < $rec{email} >\n";
        }
    }
    
  11. or download this
    {
        my %rec = (
    ...
        }
    }
    # line 7 foo.pl
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://996497]
Approved by moritz
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2014-10-01 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (41 votes), past polls