Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Lady Aleena's first working module

by toolic (Bishop)
on Oct 05, 2009 at 13:26 UTC ( #799253=note: print w/replies, xml ) Need Help??

in reply to Lady Aleena's first working module

I prefer interpolation over concatenation where possible because it seems less noisy to me. For example, I would change:
my @evil = map($_." evil",@lawful_vs_chaotic); return $prefix." ".$suffix;


my @evil = map("$_ evil",@lawful_vs_chaotic); return "$prefix $suffix";
I have not decided whether or not I will ever upload it to CPAN
Your decision should be based on whether your code provides something that is not currently available on CPAN, according to results of a diligent search on your behalf. Does your code provide more functionality? Or, does it do so more efficiently (speed, memory)? Is it more robust or portable than something comparable? Is it more user-friendly (simpler to use, easier to download/install)?

If the answer to any of these questions is 'yes', then I would say it is a candidate for CPAN. In that case, your next step is to create a test suite. And to finish things off, I second ELISHEVA's advice regarding more standard POD sections.

Replies are listed 'Best First'.
Re^2: Lady Aleena's first working module
by Lady_Aleena (Curate) on Oct 06, 2009 at 06:52 UTC

    The only reason I go with concatenation is that it is easier to see in my text editor which color codes everything. Everything between "" and '' is in gray. To find scalars and other code faster while debugging, it is just simpler to concatenate. Every once in a while I will use qq{} for really long strings with some scalars and code in it, but that is rare. I am not too partial of the color my text editor has for hashes. I really should change that. :)

    I haven't really looked on CPAN for these, but I doubt that there are any modules that have this level of specificity. They are not too functional outside of their specific topics. I haven't checked speed, but they are small, so it stands to reason that they are fast. Well, at least my reasoning anyway. I am not sure how robust they are, but I tried to cover all the bases under the specific topic. They are pretty portable, I think, as I did not make them specific to one platform such as loading them down with HTML. I will have to look into what a test suite is.

    Thank you for searching CPAN on my behalf, I appreciate it. One day I may make a presence for myself there, but I am not quite that good yet. :)

    Have a nice day!
    Lady Aleena

      It is isn't a question of "that good" but rather "good enough" and "useful". If there are other people that want to build AD&D games using Perl, then they might find your module useful.

      Good enough means using good programming practices (you are), a not-too-unconventional documentation style, and, of course, a test suite that passes. See Test::Simple and Test::More for more information on how you can use Perl to test your software. Testing sounds intimidating but it is really quite easy.

      The only other question is do I have the time to update it as I add new features and to maintain it if someone reports problems? A module is more likely to be used if it looks like it is being well taken care of.

      Best, beth

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2021-04-20 20:40 GMT
Find Nodes?
    Voting Booth?

    No recent polls found