in reply to Golfing the day of Christmas
in thread Christmas Coding Blues

What are the golfing rules on modules? I always thought modules were kind of cheating, but then I saw a couple of them in the thread here. So I thought of using Date::Christmas, but that leads to an answer well over 60 characters, but then you could really cheat and release the same module with a shorter module and function name and easily beat anything here. Which is why I always thought using modules was sort of cheating (of course if you could sneak in a 'christmasday' function into perl's internals, that'd be cheating also, but impressive :-)

Replies are listed 'Best First'.
Re: Re: Golfing the day of Christmas
by Masem (Monsignor) on Dec 13, 2001 at 22:46 UTC
    Unofficially, you shouldn't use modules in perl golf unless specifically called for or given as an option in the problem. (Hypothetically, you could write a module that does the bulk of the work though still be of utility to others outside of the golf, release it to CPAN, then use that module in your golf to crush the other players). Typically golfs with 70 or more characters will be benefitted by a module use, while for golfs less than that, the module might be more trouble (as you have to add 5 + lenght(module name) automatically to use the module.

    -----------------------------------------------------
    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
    "I can see my house from here!"
    It's not what you know, but knowing how to find it if you don't know that's important