In my environment I have an isolation script, git-like. I will call it 'blah' for the sake of example. There are identically functioning version of blah for cmd, sh, and other environments as needed.

Basically, I configure the environment to an expected state prior to kicking off the actual worker scripts. The only thing that changes between production, test, my development, your development, and Joe Blogg's development environments are the settings configured in the isolation scripts (blah.cmd, for example). Given this setup, you should be able to isolate your environment from the operating system to be able to interact however you wish it to - including totally ignoring your vendor's minimal installation of perl.

From the OS side of things, if you need to launch something from, for example, a shortcut, you would preface the invocation with the isolation script appropriate for the environment you are launching your real script under. blah plackup myapp.psgi, as an example, would launch your myapp.psgi plack application in the environment configured by blah. You need to change the environment (or launch it in dev, or change the location of a resource, or....), you use a modified isolation script.

You can even take it so far, if you wish, as to pass in the location of all of your resources (databases, data locations, ports, hostnames, and so on) via the environment through your isolation script. As an example, I have a CSV set of data that I use for my user database in development, and in production I use a corporately-maintained LDAP store. The only change is a modification to an environment variable pointing to a different data source (see URI::db and DBD::LDAP). No change in the code, only a change in the data source.

See also twelve factor app.

--MidLifeXis


In reply to Re: Perl on Windows 2008 R2 by MidLifeXis
in thread Perl on Windows 2008 R2 by jbev2328

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.