Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

RE: RE: Modules

by perlmonkey (Hermit)
on May 25, 2000 at 07:52 UTC ( #14698=note: print w/replies, xml ) Need Help??

in reply to RE: Modules
in thread Stock Quotes

I agree with the first part of your argument, you can learn some excellent stuff by looking at what has already been done in other modules.

However for anything other than learning, and your own pet projects, I would certainly recommend using non-standard modules (non-standard meaning modules not distributed with perl). I am not saying this because you might reinvent the wheel, but there is a huge part of good programming that people here seem to never think about: maintenance! If you copy and paste code from a module into your own code then you are stuck maintaining that code forever. So not only do you have to maintain the code specific to your project, but also the code that is general in purpose. Say there were actual bugs in the code you copied over, then instead of fixing the bug your self, you just use the CPAN module and grab the latest release (letting someone else fix the bugs for you).

But of course there are some problems using the module approach, if the author decides to change the API from one version to the next then you have to modify your code to use the new version. But that is why I would not recommend for production code using modules with lower version numbers or ones that in the documentation say they are 'alpha' or 'beta' modules. Other than that, include what ever you think might be handy.

Of course I recognize there are exceptions to every rule, like critical speed performance. But for most large applications, I just wanted to mention that I think maintenance should be a significant consideration. We may leave a project, but our code lives on forever!
Something to think about anyway.

Update: Anyone what to bother telling me why this node is a negative reputation? If you have a counter argument let me hear it, otherwise I still think the advise is pretty sound.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://14698]
[Corion]: Do you want to launch a script and keep the command prompt/console window open?
[Corion]: Do you want to wait for a key press before closing the window?
[LanX]: I want the command line in the history
[tye]: -Mouse
[Corion]: Option a) would mean launching cmd.exe /k c:\path\to\ batchfile- launching-perl- script.cmd. Option b) would be to add pause as the last line of said batch file.
[LanX]: First day after holidays ... and already stressed by the fact that colleagues changed stuff without communication ... apparently I'm the only one trying to fight entropy
[Corion]: LanX: The command is always in the history if you typed it in before. If you didn't type the command into the command line, it will not be there. I think there is doskey which can stuff command lines into the history
LanX damns the cult of CB ;-)
[LanX]: please forget my last 3 posts

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2017-03-27 15:46 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.