in reply to Re: how to get the perl installed modules
in thread how to get the perl installed modules

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: how to get the perl installed modules
by Polonius (Friar) on Jun 05, 2006 at 10:31 UTC

    madtoperl,

    I considered messaging this privately, but I think there are lessons here that might benefit others.

    Several years ago, in an HTML forum, I set about answering another poster's question. After about three-quarters of an hour picking out various mistakes in the OP's code (which had obviously been cut-and-pasted from other sources with little understanding), it seemed that I had spent more time on this than the original poster.

    Many years before that, when I was new to programming, I sat beside someone much more experienced, who was able to answer all my questions. Whenever I had the slightest difficulty, it was too easy to ask.

    As Frederick Brooks said, "Good judgment comes from experience; experience comes from bad judgment." (Thanks for the link, eyepopslikeamosquito.) If you spend more time trying to fix errors yourself rather than calling for help (I know it's tempting; I've been there), you will learn much more from your own mistakes.

    Polonius
Re^3: how to get the perl installed modules
by davorg (Chancellor) on Jun 05, 2006 at 09:24 UTC
    I replace the new function by module function

    That's where you're going wrong. You're no longer creating an ExtUtils::Installed object.

    perl_lover's code does exactly what you want. There's no need to change it.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Re^3: how to get the perl installed modules
by perl_lover (Chaplain) on Jun 05, 2006 at 08:18 UTC
    s/moudles/modules/;
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^3: how to get the perl installed modules
by McDarren (Abbot) on Jun 05, 2006 at 07:12 UTC
    You could try spelling "modules" correctly.
Re^3: how to get the perl installed modules
by unobe (Scribe) on Jun 06, 2006 at 10:28 UTC
    my $inst = ExtUtils::Installed->modules();

    should be

    my $inst = ExtUtils::Installed->new();

    Maybe just copy and paste next time?