Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Developing code to be a module

by talexb (Canon)
on May 01, 2013 at 16:39 UTC ( #1031607=note: print w/replies, xml ) Need Help??


in reply to Developing code to be a module

Good question.

I think about whether the module's going to represent an object, whether it's going to be an API, or whether it's just going to be a collection of useful, related code.

Once I've figured that out, I can start writing the module, ideally writing tests as I go, so that I have some confidence that new stuff doesn't break the old stuff.

The three standard modules I start with are strict, warn and Carp, and I always write code with error-checking in place -- that way I never have to remember to add it later.

And I also use git, committing early and often. I can't tell you how many times way back when I hacked on some code, realized it was a disaster, and longed to go back to an earlier, working version. With git, you can totally do that.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031607]
help
Chatterbox?
[stevieb]: ahhh yes, it *is* a ref. I had forgotten that. I too have learned something. I quit too!!
[marioroy]: Is List::Util::XS a core Perl module?
[stevieb]: corelist List::Util::XS says "List::Util::XS was first released with perl v5.10.1"
[stevieb]: so yes, since v5.10.1 :)
[MidLifeXis]: According to [metaperl:// corelist], Perl 5.10.1
Lady_Aleena blurbles. One of her favorite modiles is now in "maintenance mode" in favor of a new fangled module.
[MidLifeXis]: D'oh. Slow out of the gate.
[marioroy]: Thanks stevieb, MidLifeXis.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2017-05-24 17:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?