This queue is for tickets about the BSD-Resource CPAN distribution.

Report information
The Basics
Id:
53859
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
user42 [...] zip.com.au
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: clarify get_rlimits() docs
Date: Thu, 21 Jan 2010 08:37:13 +1100
To: bug-BSD-Resource@rt.cpan.org
From: Kevin Ryde <user42@zip.com.au>
I found the example code with get_rlimits() a bit unclear $r = get_rlimits(); print "ok.\n" if ($r->{'RLIM_STACK'} == RLIM_STACK); It uses the RLIM_STACK constant, yet checking whether such a constant exists is the reason for calling get_rlimits()! I see it's trying to say the value in the hash is the value of the constant, but it might be better to put that in words and something more likely as example code, eg. my $limits = BSD::Resource::get_rlimits(); foreach my $name (keys %$limits) { my ($soft, $hard) = BSD::Resource::getrlimit ($limits->{$name}); print "$name soft $soft hard $hard\n"; } I wondered too whether BSD::Resource->can('RLIMIT_STACK') works as well. There could be a note on that. Of course can() can't list the available limits, but can ask if a particular constant exists.
Thanks for the suggestion, will be fixed in the next release.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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