Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: RFC: New style for argument check in subs

by Tux (Monsignor)
on Sep 05, 2012 at 15:05 UTC ( #991876=note: print w/ replies, xml ) Need Help??


in reply to Re^2: RFC: New style for argument check in subs
in thread RFC: New style for argument check in subs

Not rare at all! Both as unnamed and as named parameter used in DBI + DBD::CSV:

use DBI; my $dbh = DBI->connect ( "dbi:CSV", # Unnamed, driver undef, # Unnamed, username undef, # Unnamed, password { f_ext => ".csv/r", # Named and defined f_schema => undef, # Named and undefined });

FWIW all NULL values in a database are refered to through undef, so you'll see a lot of those in both named and unnamed arguments to functions and methods.


Enjoy, Have FUN! H.Merijn


Comment on Re^3: RFC: New style for argument check in subs
Select or Download Code
Re^4: RFC: New style for argument check in subs
by LanX (Canon) on Sep 05, 2012 at 15:30 UTC
    Good point.

    But in those cases checks for existence should be explicit.

    UPDATE: You convinced me that

    *** Unpack Named First

    is a danegrous option. Thanks :)

    Cheers Rolf

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2015-07-05 02:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls