Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • A few comments from a brief look at the code.

    * I think you have trimester and quartermaster the wrong way round.

    * Does 'quartermaster' have the meaning you're trying to give it here? Maybe it should be 'quartermester'.

    * Your calculation of whether a year is a leap year is incorrect (1900 and 2100 are not leap years).

    * Would it make sense to also have a "make_gm_hash" function?

    * Looks like most (all?) of your reference data hashes would be better implemented as arrays.

    * With a module that only exists in order to export a single subsroutine, it probably makes sense to put that subroutine in @EXPORT instead of @EXPORT_OK.

    Hope this helps.
    • * I think you have trimester and quartermaster the wrong way round.

      Probably... I said I couldn't sleep, I didn't say I wasn't sleepy O:-)

      * Does 'quartermaster' have the meaning you're trying to give it here? Maybe it should be 'quartermester'.

      Probably so (I had a note here to check the meaning of the word in a dictionary)

      * Your calculation of whether a year is a leap year is incorrect (1900 and 2100 are not leap years).

      I am aware of that, but thanks for noting :-)

      * Would it make sense to als

      • * Would it make sense to also have a "make_gm_hash" function?

        I don't get this one... what would that do? :-|

        It would do exactly the same thing as "make_hash", except it would use "gmtime" instead of "localtime".

        A couple more suggestions:

        * Call the function "make_date_hash" instead of "make_hash".

        * If no argument is given, call "localtime" without an argument - to get a hash representing the current date and time.