Skip Menu |

This queue is for tickets about the DPKG-Parse CPAN distribution.

Report information
The Basics
Id: 27172
Status: resolved
Priority: 0/
Queue: DPKG-Parse

People
Owner: holoway [...] cpan.org
Requestors: TEEJAY [...] cpan.org
Cc:
AdminCc:

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



Subject: SYNOPSIS of DPKG::Parse::Available missing 'parse' method
Two issues here really.. The synopsis of DPKG::Parse::Available shows : ############################ use DPKG::Parse::Available; my $available = DPKG::Parse::Available->new; while (my $entry = $available->next_package) { print $entry->package . " " . $entry->version . "\n"; } my $postfix = $available->get_package('name' => 'postfix'); ############################ But it won't work without calling parse() on $available before using the object. The second issue is obviously that you don't get an error or warning when attempting to use the object without calling parse() first. fixed SYNOPSIS should read : ############################ use DPKG::Parse::Available; my $available = DPKG::Parse::Available->new( ); $available->parse(); while (my $entry = $available->next_package) { print $entry->package . " " . $entry->version . "\n"; } ############################
This is fixed in 0.02, just released to CPAN. It's all a documentation fix, since getting the system to carp if you don't call parse() was going to take longer than fixing up the POD. (along with a warning about what happens when you don't call parse().) Thanks for the bug, Adam