Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Function Prototypes

by muba (Priest)
on Nov 24, 2015 at 01:37 UTC ( #1148465=note: print w/replies, xml ) Need Help??


in reply to Function Prototypes

If coded as is (below), the sub works;

Cool cool.

There's a lot of things to say about the way Perl passes arguments into a subroutine through this weird @_ variable. But don't you just love it how it allows you to write stuff like my %hArgs = (default1 => "foo", default2=> "bar", @_); ... inside a sub, and then call that sub with ConfigRead default2 => "banana juice", extra => "new key/value pair w00t w00t"; and it just works and you preserve one default setting, override another, and even introduce a third setting? It's things like that make adore this language.

So thumbs up to you, KimberTLE, for coming up with a solution that works. And I don't mean that sarcastically, I am indeed sincere. So... is there a question?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2019-04-25 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (126 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!