Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: PAUSE problem

by Anonymous Monk
on May 03, 2011 at 09:50 UTC ( [id://902662]=note: print w/replies, xml ) Need Help??


in reply to PAUSE problem

Please see How do I compose an effective node title? while you use PAUSE to publish code on the CPAN, your problem is not with PAUSE :)

Ok, now to your actual code, the official way to store templates, defaults ... is with File::ShareDir (See also File::ShareDir::Install)

Besides __PACKAGE__, there is also __FILE__ and __LINE__, see http://perldoc.perl.org/perldata.html#Special-Literals

Replies are listed 'Best First'.
Re^2: PAUSE problem
by hsmyers (Canon) on May 03, 2011 at 10:07 UTC
    Since I didn't know that the problem was not with PAUSE until the node mentioning the patch, I'm not sure that the title wasn't accurate at that point in time. Vague perhaps, but still accurate. A quibble and your point is taken. More importantly I had not known about the modules you mention and find that very useful--- thanks! Don't understand the last line though; what did you have in mind?

    --hsm

    "Never try to teach a pig to sing...it wastes your time and it annoys the pig."
      Don't understand the last line though; what did you have in mind?

      Nothing important, just hoops. Instead of

      my $mod = __PACKAGE__; $mod =~ s{::}{/}g; $mod .= '.pm'; $mod = $INC{$mod}; $mod =~ s/EPD\.pm//i; my $module_dir_qfn = realpath($mod); my $db_dir_qfn = catdir($module_dir_qfn, 'db');
      You might have used
      realpath( catfile( __FILE__, updir(), 'db' ) );
        It took a bit of head bashing, but this:
        my $db_dir_qfn = realpath( catfile( __PACKAGE__, updir(), 'db' ) );
        seems to do the trick nicely. Love getting rid of lines of code for one--- particularly when the lines gone look more like the much maligned perl line noise! Thanks for the suggestion.

        --hsm

        "Never try to teach a pig to sing...it wastes your time and it annoys the pig."
      Since I didn't know that the problem was not with PAUSE until the node mentioning the patch, I'm not sure that the title wasn't accurate at that point in time. Vague perhaps, but still accurate. A quibble and your point is taken.

      I probably should have phrased that better, thanks :)

      With the information contained in your question, and the guidance of How do I compose an effective node title?, effective titles might be:

      • FAIL Chess-PGN-EPD-0.25 v5.12.3 MirOS BSD
      • tester fail cpansmoke/perl-5.12.3/cpan/build/Chess-PGN-EPD-0.25
      • Chess-PGN-EPD-0.25/t/01_epdcode.t Non-zero exit status
      • Chess-PGN-EPD-0.25/t/01_epdcode.t Parse errors: Bad plan
      • Chess-PGN-EPD-0.25 Failed 7/8 test programs
      • problem testing Chess-PGN-EPD-0.25
      • Chess-PGN-EPD-0.25 subtest not run on MirOS BSD
      "PAUSE problem" makes me think there is a bug PAUSE

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-19 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found