Skip Menu |
 

This queue is for tickets about the Disabled-8645 CPAN distribution.

Report information
The Basics
Id: 4416
Status: new
Priority: 0/
Queue: Disabled-8645

People
Owner: Nobody in particular
Requestors: phil.hibbs [...] cgey.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Getopt::Std getopt() function
Download (untitled) / with headers
text/plain 582b
The documentation says that the getopt() function "sets $opt_x (where x is the switch name) to the value of the argument if an argument is expected, or 1 otherwise". I assumed that the alternate form of getopt(), where a reference to a hash is provided, would perform similarly and set the hash value to 1 where no parameter was passed. This is not the case, and is confusing. Either this behaviour should be changed, or made clear in teh documentation that the two forms of getopt() differ in behaviour. Example: #!perl use Getopt::Std; getopt('z', \%o); print "z\n" if $o{'z'};


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.