[NTLUG:Discuss] Perl problem
Stuart A Johnston
saj at thecommune.net
Sat May 17 13:00:58 CDT 2014
Sounds like the module might be changing your working directory. Can you
use absolute paths?
You also might consider whether threads are the best solution. The
threading implementation in Perl is not really very commonly used,
particularly on Linux. Other options would include Parallel::ForkManager
and Coro, or just simply 'fork'.
For more suggestions maybe post in a Perl-specific forum like DFW.pm.
On 05/16/2014 03:42 PM, rp8034l wrote:
> Greetings:
>
> I am looking for assistance with a Perl problem.
> When I run the attached program, it abnormally terminates and I get the
> following error message:
>
> $ perl sample.pl
> Could not find file for 'example.pdf' at \
> /usr/local/share/perl5/load.pm line 214.
>
>
> Best I've been able to determine is that adding the "use Thread::Pool"
> statement appears to cause the "PDF::API2" module to fail...
>
> Any ideas would be appreciated!
> RichardP
>
>
> - - - - - - - - - - - - - - - - -
> System configuration
> - - - - - - - - - - - - - - - - -
>
> Resource Version
> ---------------- --------
> Fedora 17 x86_64 kernel 3.9.10-100.fc17.x86_64
> perl This is perl 5, version 14, \
> subversion 4 (v5.14.4) built for \
> x86_64-linux-thread-multi
> PDF::API2 2.021
> Thread::Pool 0.33
>
>
> - - - - - - - - - - - - - - - - -
> *** sample.pl ***
> - - - - - - - - - - - - - - - - -
>
> #!/bin/perl -w
>
> use strict;
> use warnings;
>
> use PDF::API2;
>
> # Uncomment the following line and program will fail!
> #use Thread::Pool;
>
> my $page;
> my $pdf;
>
> # Create a PDF file with one (blank) page in it
> $pdf = PDF::API2->new(-file => 'example.pdf');
> $page = $pdf->page();
> $pdf->save();
>
> print "Done!\n";
> exit 0;
>
> - - - - - - - - - - - - - - - - -
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
More information about the Discuss
mailing list