Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Review request for PDF::API2 Tutorial

by graff (Chancellor)
on Aug 17, 2004 at 06:22 UTC ( [id://383564]=note: print w/replies, xml ) Need Help??


in reply to Review request for PDF::API2 Tutorial

I realize this is probably something beyond your control, but the version dependency of the tutorial comes across as a rather a serious deficit -- this quote from the fourth paragraph makes it sound like you are providing instructions with a very short life-span:
This document refers to version 0.03.77 of PDF::API2. If you have an older version, I recommend that you upgrade. It may still work, but I'm not guaranteeing it. If you've downloaded version 0.40 or greater you should be aware that it is only a developer release and that the API has changed considerably. This tutorial is guaranteed not to work with version 0.40+.
(emphasis in the original)

Apart from that, I'd feel better about the example code if it included "use strict" and "use warnings". I wanted to check that out for myself, but when I followed the link labeled "You can download the source code here: pdf_api2_tutorial_1.pl.txt", I got a page that said "We can't find your document... We've just upgraded our website and have moved things around..." (seems like your source code may have been "moved" into oblivion).

Minor nit-picks: You open a file named "$0.pdf" -- that's probably not a good idea, because $0 can (often will) include the path along with the script name (i.e. where the script itself is located in the file system, which might not be the CWD, and/or might not be write-accessible to the user). Also, I couldn't tell where, or whether, you were checking for failure to open or write the output file. Does the module handle that for you, and if so, what is the best/easiest/safest way for the module user to handle its behavior on failure? (Your sample code should show how to do that.)

It's obvious that the part at the end is "under construction", which makes the "conclusion" of the tutorial a bit of a puzzle, but for the part that is fleshed out, I think it looks very clear and nicely organized -- I actually know next to nothing about creating pdf content from scratch, and your tutorial (what there is of it) leads me to believe that I could learn in very short time how to use this module to good advantage (provided I start with the particular release that you are writing about ;). To me, that's the mark of true success in a tutorial, and you are definitely on the right track in terms of approach.

Regarding the content of the example text for the pdf page... um, why in Latin?

  • Comment on Re: Review request for PDF::API2 Tutorial

Replies are listed 'Best First'.
Re^2: Review request for PDF::API2 Tutorial
by BigLug (Chaplain) on Aug 17, 2004 at 06:38 UTC
    Graff!

    Thanks for your excellent feedback.

    the version dependency of the tutorial comes across as a rather a serious deficit
    Unfortunately the version requirement has nothing to do with me. Version 0.4 of the module will have a new API which the developer hasn't settled yet. Once he has, it should just be a case of replacing the code.

    I'd feel better about the example code if it included "use strict" and "use warnings"
    You're right, I should have both strict and warnings in there.

    a file named "$0.pdf" -- that's probably not a good idea
    I'll take that under advisement and probably change it.
    checking for failure to open or write the output file
    Another excellent point. I have never thought to handle it and I've never had it fail to write in my main project. I'd better do some research, document it in the tutorial and then fix the application here at work!!
    your tutorial ... leads me to believe that I could learn in very short time how to use this module
    Excellent! That's the aim, so I'm pleased to hear it.
    Regarding the content of the example text for the pdf page... um, why in Latin?
    It's a typographic convention for when the text doesn't matter. (And it's not quite in latin -- it just looks like it is) See: lorem ipsum
    If this is a root node: Before responding, please ensure your clue bit is set.
    If this is a reply: This is a discussion group, not a helpdesk ... If the discussion happens to answer a question you've asked, that's incidental.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://383564]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-16 04:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found