Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Minimizing dependencies (was: Perl Factory Method Pattern?)

by lachoy (Parson)
on Oct 13, 2004 at 00:40 UTC ( #398747=note: print w/replies, xml ) Need Help??

in reply to Perl Factory Method Pattern?

Just a few words on minimizing dependencies:

Having to download/build dependencies is a complaint a lot of people have with large modules/applications on CPAN. I don't personally agree with not using a module because of dependencies-- especially a pure-Perl module! without additional dependencies of its own! -- but you should at least realize that you're making a number of trade-offs by doing so.

  • This module has been on CPAN for nearly four years, and has been exercised by lots of people in lots of situations on lots of platforms. Yours is brand new and barely tested.
  • Chances are those additional features in the module are there for a reason; if you continue to improve yours for a while you'll probably see why.
  • Because it's written for public vs. private consumption I'm guessing it has much better documentation than you're going to write, which makes it easy for the person reading your code six months from now to figure out what's going on. Even if that person six months from now is you.

I'm not saying anything bad about re-creating functionality to learn how it works because I learn by doing too. Going through the trials of typing in code, debugging it, thinking about ways to break it is a great way to learn. (And I've been known to recreate some wheels as well...) But CPAN is such a fantastic resource that it seems a shame to dismiss it because you'll have to mount the wheel yourself :-)

And yes, I'm the Class::Factory author, so I'm a little biased :-)

M-x auto-bs-mode

  • Comment on Minimizing dependencies (was: Perl Factory Method Pattern?)

Replies are listed 'Best First'.
Re: Minimizing dependencies (was: Perl Factory Method Pattern?)
by osunderdog (Deacon) on Oct 27, 2004 at 18:52 UTC

    It's a great library and I'm going to end up using it. I'll just add it to a local package collection.

    "Look, Shiny Things!" is not a better business strategy than compatibility and reuse.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2022-01-21 07:54 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (57 votes). Check out past polls.