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

Owner: Nobody in particular
Requestors: c.hauser [...]

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

Subject: PDF::API2::Resource::XObject::Form::BarCode::int2of5 broken
Download (untitled) / with headers
text/plain 677b
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 ***

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

Please report any issues with to