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 ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday August 19, 2003
12:26 PM

DRY (Don't Repeat Yourself)

[ #14205 ]

I have an idea for a one day class that I want to teach, so I sat down to write the sample code for it.

h2xs -AX -n Homepage::Manager
cd Homepage/Manager
rm t/1.t
cp ~/projects/common/t/base.t t/manager.t
cp ~/projects/common/t/grind t/
cp ~/projects/common/reload .

Then, I have to go in and do some standard editing to the basic test script, MANIFEST and Makefile.PL. In other words, after using h2xs to create my stub module, there are several tasks that I perform every time I start a project. While I've already hacked h2xs to use my email address and basic POD standards, when I get home tonight, I'm going to hack it to always set up my development environment just the way I like it. I'm tired of spending an extra ten minutes customizing things every time. Why didn't I think of this before?

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.
  • See the light as I did. If you're not using XS, h2xs is just baggage. Write a little script to do:

    cd /path/to/your/devel/dir
    mkdir Some-Module
    cd Some-Module
    mkdir -p lib/Some/
    cp /path/to/templates/ lib/Some/
    perl -i -pe 's/Module::Template/Some::Module/g;' lib/Some/
    mkdir t
    cp /path/to/templates/t/test.t t/Some-Module.t
    perl -i -pe 's/Module::Template/Some::Module/g;' t/Some-Module.t
    cp /path/to/templates/Makefile.PL
    perl -i -pe 's/Module::Template/Some::Module/g;' Makefile.PL
    perl Make