Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

WebDragon (1204)

  (email not shown publicly)

Macintosh owner/user since 1987
Perl hacker since 2000
Linux (Redhat/Fedora) user since 2001

Journal of WebDragon (1204)

Sunday April 20, 2003
12:52 PM

out with the old, in with the new

[ #11746 ]

Ahhhhh spring cleaning...

Just as I was settling in to do some revamping of my modulereport script to add a shortened summary option, and to make the switch from Getopt::Std to Getopt::Long, I got an e-mail from someone who liked it and wanted to include it as part of his project. Whee!

Consequently, I put a little extra effort into it, and added the nifty Pod::Usage and wrote all the Pod for it, from scratch, removing some of the header #comments.

The interesting part started when I switched to Getopt::Long. For the life of me I couldn't figure out why my use of use constant, which had worked since the very beginning, was now failing. After much swapping around of variables and lines, I discovered that my combining of

our($VERSION, %opts) = (1.3);

was in fact assigning () to %opts, AFTER the BEGIN block got done setting option switches. WHY was I using a BEGIN block? Because otherwise use constant would not get the assignment properly from one of the option switches. Doh! This is the first time I've wrapped Getopt::Long in a BEGIN block, so I was flummoxed quite thoroughly. Needless to say a posting to perl5-porters reporting the possible bugness of this was cheerfully corrected by the crowd.

*sigh* Thus, the sound daemon was enlightened.

Fired off a copy of the update to the guy, and am awaiting either the huzzahs of the cheerful crowd or the wailing and gnashing of teeth.

Blah on weather that won't make up its mind to stay warm enough to keep me happy. Oh well, at least I'm getting some work accomplished.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.