in reply to Challenge: CPAN Golf

I think some of the part of your rant is adressed by the Tiny subclasses that adamk writes.

But I have a question - does exercise code of each other also include code generated by the used module?

For example, Class::Accessor injects code into my module/namespace - does that count as "exercise", at least if the accessor is used within my code?

As counter example, parent.pm does all its work in the ->import() subroutine and hence will not count as "exercised", right?

Replies are listed 'Best First'.
Re^2: Challenge: CPAN Golf
by shmem (Chancellor) on Jan 08, 2008 at 13:04 UTC
    For example, Class::Accessor injects code into my module/namespace - does that count as "exercise", at least if the accessor is used within my code?

    Of course yes - but as you say, only if your code actually uses those accessors.

    As counter example, parent.pm does all its work in the ->import() subroutine and hence will not count as "exercised", right?
    This is an edge case; parent.pm works like a pragma (at compile time), so I would count that exercised, too. If you just use parent qw(Catalyst Jifty) without milling any code of those, then you are cheating not only with Catalyst and Jifty, but with parent.pm also.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}