Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

PDF::Create fails on install

by ric00015 (Beadle)
on Nov 26, 2013 at 22:58 UTC ( #1064492=perlquestion: print w/ replies, xml ) Need Help??
ric00015 has asked for the wisdom of the Perl Monks concerning the following question:

I am exploring options on how to create a document from Perl. Some of the options were to create a Word document (but I hear that sucks, partially because there is no real standard for their formats); RTF (as an alternative for the .doc); or LaTex to create a PDF. I happened to come across PDF::Create on CPAN (to see if I can bypass latex), but it won't even install. I am coming here to see if this is a bug, or if I'm just doing something wrong.

I am using Perl 5.16.0, on Red Hat 5.6. The complete error output is as follows:

Writing /home/fg4y8n/.cpan/Metadata Running install for module 'PDF::Create' Running make for M/MA/MARKUSB/PDF-Create-1.06.tar.gz Checksum for /home/fg4y8n/.cpan/sources/authors/id/M/MA/MARKUSB/PDF-Cr +eate-1.06.tar.gz ok Scanning cache /home/fg4y8n/.cpan/build for sizes ...................................................................... +......DONE CPAN.pm: Building M/MA/MARKUSB/PDF-Create-1.06.tar.gz Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'PDF-Create' version '1.06' Building PDF-Create MARKUSB/PDF-Create-1.06.tar.gz ./Build -- OK Running Build test t/01-basic.t .......... ok t/02-string.t ......... ok t/03-image.t .......... ok t/04-drawing.t ........ ok t/05-outline.t ........ ok t/06-annotation.t ..... ok t/07-fonts.t .......... ok t/09-cgi.t ............ Can't locate object method "catfile" via packa +ge "File::Spec" (perhaps you forgot to load "File::Spec"?) at t/09-cg +i.t line 19. # Looks like your test exited with 255 before it could output anything +. t/09-cgi.t ............ Dubious, test returned 255 (wstat 65280, 0xff0 +0) Failed 2/2 subtests t/99-wifi-parabola.t .. ok Test Summary Report ------------------- t/09-cgi.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 0. Files=9, Tests=119, 1 wallclock secs ( 0.06 usr 0.02 sys + 0.50 cus +r 0.09 csys = 0.67 CPU) Result: FAIL Failed 1/9 test programs. 0/119 subtests failed. MARKUSB/PDF-Create-1.06.tar.gz ./Build test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports MARKUSB/PDF-Create-1.06.tar.gz Running Build install make test had returned bad status, won't install without force Failed during this command: MARKUSB/PDF-Create-1.06.tar.gz : make_test NO

File::Spec is installed and is up to date, so Iím not sure where thatís coming from.

P.S. Any advice on creating a document would be appreciated as well.

Comment on PDF::Create fails on install
Download Code
Re: PDF::Create fails on install
by monkey_boy (Priest) on Nov 26, 2013 at 23:29 UTC

    The part of that test code below:
    use strict; use File::Basename; use PDF::Create; use Test::More tests => 2; use Config; my $pdfname = $0; $pdfname =~ s/\.t/\.pdf/; my $cginame = File::Spec->catfile(dirname($0) . "/09-cgi-script.pl");

    It doesnt use File::Spec, so i dont think that test could ever pass, seems like a bug of the author & as the others pass you could safely force the install.


    This is not a Signature...

      Ah, thanks. I'll just ignore the error, force install the module and report it as a bug.

      Presumably it used to work because one of the other modules being pulled in used File::Spec, but the current version of whatever that module was doesn't. This is why you should always declare *all* your pre-requisites in Makefile.PL, even those that you know are pulled in by other pre-reqs, and you should always 'use' *all* the modules you refer to.

        This is why you should always declare *all* your pre-requisites in Makefile.PL, even those that you know are pulled in by other pre-reqs, and you should always 'use' *all* the modules you refer to.

        Can I assume that you do not mean that you should also list those packages that you do not directly use?

        For example, let's assume that I use the Foo::Bar package, and Foo::Bar uses Biz::Bang and Biz::Biff under the hood. I also make a call to Biz::Biff::frobnitz() from within my code. I am assuming that you are saying:

        • I should do a use Biz::Biff.
        • I should list Foo::Bar and Biz::Biff as prerequisites.
        I am also assuming that you are not saying that I should list Biz::Bang as a prerequisite, as that is an implementation detail of Foo::Bar, and unrelated to my own code.

        I just want to clarify my understanding, since my parser is coming up with two different meanings of your statement. If this is the correct reading of your statement, I agree 100%. As a clarification, I would probably s/your pre-requisites/your direct pre-requisites/.

        --MidLifeXis

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1064492]
Approved by ww
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2015-07-07 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls