Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Perl Module Useage

by cbro (Pilgrim)
on Apr 10, 2003 at 13:00 UTC ( [id://249598]=note: print w/replies, xml ) Need Help??


in reply to Perl Module Useage

The reason you, "have never found a reason to create a module or package", may just be due to your programming style. If you're used to procedural programming, abstraction may not seem like the right choice. You're probably used to creating subroutines...it's just that you don't pull them outside of your scripts. I like shotgunefx's comment, "If many of your scripts that use that code and you find a problem in that code, it much easier to update the module then patch a bunch of scripts."
If you are going to reuse your code even once, you may want to consider making a module out of it. Why recreate it...again, even once.

Replies are listed 'Best First'.
Re: Re: Perl Module Useage
by shotgunefx (Parson) on Apr 10, 2003 at 13:14 UTC
    I learned that the hard way. I started in C and ASM in the late 80s. Self taught and I didn't know any better about cut and paste. I came to realize that almost every time I cut and past duplicate logic that I would later find a problem and have to fix it everywhere. A much larger problem when it's was huge ASM program and no Perl to grok it for you. :(

    -Lee

    "To be civilized is to deny one's nature."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found