Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: xs modifying passed value

by bulk88 (Priest)
on Nov 18, 2012 at 07:43 UTC ( #1004381=note: print w/replies, xml ) Need Help??


in reply to Re^2: xs modifying passed value
in thread xs modifying passed value

Some people for param lists do,
my %localdog; if(@_ == 2 && ref($_[1]) eq 'HASH') { #named params my $hvref = $_[1]; $localdog{name} = $hvref->{name}; $localdog{color} = $hvref->{color}; } else{ $localdog{name} = $_[1]; $localdog{color} = $_[2]; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004381]
help
Chatterbox?
[jdporter]: "When all your nails look like trolls, all your hammers look like trolls."
erix hammers a jdporter nail randomly
[erix]: average between 1 and 20

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2018-06-21 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (118 votes). Check out past polls.

    Notices?