http://www.perlmonks.org?node_id=244176


in reply to Re: Possible to have a module act as a standalone??
in thread Possible to have a module act as a standalone??

Hmmm... I read this as him wanting a way to write, say, Npid.pm (for lack of a better name) such that a script can "use Npid;" and the right thing happens, but he can also do (from the command-line) "perl Npid.pm" and the right thing also happens.

--rjray

  • Comment on Re: Re: Possible to have a module act as a standalone??

Replies are listed 'Best First'.
Re3: Possible to have a module act as a standalone??
by dragonchild (Archbishop) on Mar 18, 2003 at 23:01 UTC
    You're correct - that was the actual question. The question presupposes an incorrect analysis of whatever problem he's attempting to solve. I could've given him an answer to his problem (cause this is a do-able thing), but he would not have grown as a programmer. The analysis of the problem was wrong. Ultimately, that is a goal of PerlMonks. (At least, that's how I've come to see this community.)

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      well, aren't you the smug one? Not.
      Tell me, you've bought one of those shirts from thinkgeek that says "No I will NOT fix your computer!", right?
      Or do you instead have as a role model the bureaucrats at the local DMV who will refuse service if one has marked initials in box 37-c while smugly pointing out that signatures are required in 37-c while initials are required in 37-d? geez, monks like you make me sick. What I would like to see in a community is friendly help:
      "Hey, I'm thinking of doing this. I'm going to use module X and Y."
      "Well, ok, but I think you'd be better off with module A. Here's why..."

      --
      We are the janitors of the Information Age.
      Oh, and please remember I'm a jerk. Don't take it personally.