Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

RE (tilly) 5: Win32::MemoryInfo

by tilly (Archbishop)
on Sep 01, 2000 at 21:57 UTC ( #30766=note: print w/ replies, xml ) Need Help??


in reply to (Guildenstern ) REx4: Win32::MemoryInfo
in thread Win32::MemoryInfo

Silly trick:

my %args = %default, @_; foreach my $arg (keys %args) { unless (exists $allowed{$arg}) { croak("Unrecognized argument '$arg' passed to MemoryStatus."); } }
Just put all possible defaults in %default and the user can override any combination they want, and your %allowed check will catch most typos and misunderstandings of the API.


Comment on RE (tilly) 5: Win32::MemoryInfo
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-09-22 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (182 votes), past polls