Skip Menu |

This queue is for tickets about the PDF-API2 CPAN distribution.

Report information
The Basics
Id: 7162
Status: resolved
Priority: 0/
Queue: PDF-API2

People
Owner: Nobody in particular
Requestors: c.hauser [...] itassistance.ch
Cc:
AdminCc:

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



Subject: PDF::API2::Resource::XObject::Form::BarCode::int2of5 broken
In PDF::API2::Resource::XObject::Form::BarCode::int2of5, the 'new' sub calls sub 'encode' as a method of $self, i.e. *** START CODE SNIPPET *** my @bar = $self->encode($opts{-code}); *** END CODE SNIPPET *** 'encode' expects to be called as a normal sub, not a method: *** START CODE SNIPPET *** sub encode_int2of5 { my $string=shift @_; *** END CODE SNIPPET *** This makes the module print a barcode for the value of $self in new, rather than the -code argument. Its easy to fix, e.g.: *** PROPOSED CHANGE OLD CODE IN new *** my @bar = $self->encode($opts{-code}); *** PROPOSED CHANGE REVISED CODE IN new *** my @bar = &encode($opts{-code}); *** END PROPOSAL ***