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

Replies are listed 'Best First'.
Re^4: RFC: New style for argument check in subs
by LanX (Saint) 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