Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

(Sorry for the delayed reply. I started then got interrupted by an emergency.)

You might also want to consider having DEPLOYER do a little more of the "grunt work".

You have 3 lists of the same files: pathsToDep­loy, filesToDep­loy and filesToCon­vert. You only need one list/table, then derive the individual lists.

In DEPLOYER, do

my %pathsToDep­loy; my %filesToDep­loy; my @filesToCon­vert; sub Deploy { my %ToDep­loy = @_; %pathsToDep­loy = map { $_ => $ToDep­loy{$_}->[0] } keys %ToDep­l +oy; %filesToDep­loy = map { $_ => $ToDep­loy{$_}->[1] } keys %ToDep­l +oy; @filesToCon­vert = keys %ToDep­loy ); # other code }

Then in your deploy script, you only need:

DEPLOYER::Dep­loy ( "MY_LAUNCHER_1102320­0099.sh" => [ '/fancy/deploy/path', 0775 ]­, "fileSanity.pl" => [ '/fancy/deploy/path'­, 0775 ], "transferFile.sh" => [ '/fancy/deploy/path'­, 0775 ], );

This will make the deploy scripts easier to configure because each file is mentioned only once, instead of the 3 times the legacy deploy scripts works and your current new proposal.

Also, as long as DEPLOY.pm has use File::Copy; the deploy scripts only need use DEPLOY;


In reply to Re: Modernizing a Deploy script to standard distro v5.10.1 by RonW
in thread Modernizing a Deploy script to standard distro v5.10.1 by rje

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-17 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found