Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: How to turn a "developer code" into a "user code"

by Corion (Pope)
on Mar 11, 2012 at 15:24 UTC ( #958959=note: print w/ replies, xml ) Need Help??


in reply to How to turn a "developer code" into a "user code"

Personally, I prefer not to have "developer" configuration (also passwords) in the program. I either put those into a configuration file or take them from %ENV.

For distributing code to non-programmer friends, I usually package up the complete program together with the Perl executable etc. into one ZIP archive and mail it to them or bring it to them. If I am really, really sure they don't need additional modules, I just mail them the new main .pl file to replace the old .pl file.


Comment on Re: How to turn a "developer code" into a "user code"
Select or Download Code
Replies are listed 'Best First'.
Re^2: How to turn a "developer code" into a "user code"
by mascip (Pilgrim) on Mar 11, 2012 at 16:39 UTC

    Personally, I prefer not to have "developer" configuration (also passwords) in the program. I either put those into a configuration file or take them from %ENV.
    Taking them from %ENV sounds interesting. If i understood well, it would mean that as a default, $I_AM_DEV would be set to 0, and that on my computer, it would be set to 1 through an environmental variable. Thus, i wouldn't need to change it each time i'm passing him the program (i also just send him the .pl file when there are no new prerequisites).
    Did i understand what you are doing properly ?

      Yes, or alternatively, there are some pre-set environment variables, like (on Windows), $ENV{USERNAME} (which is 'corion' on my machine), and the name of the machine. Using these, you can switch on more verbose output automatically.

        Nice idea, thank you :o)

        I have two questions about WWW::Mechanize::Firefox, i will post them soon (i am writing a clean example code first).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://958959]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2015-07-08 07:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (96 votes), past polls