Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I always thought that the major reason to use modules like File::Copy was to make the script as platform-independent as you could. I don't see anything wrong with using backticks for system commands. I mean to run something (natively) on the host OS, you need either system, exec, or backticks, and they each have different functionality, but which one to use depends on what you want to accomplish.

More than using backticks, I'd be concerned about the paths that you're using in the move and copy statements. Are you sure that the target directories will be there? Are you using mkdir -p where applicable? That kind of thing.

Regarding 'rm', Perl has an 'unlink' function that operates the same way as the system call, with probably less overhead of the backticks, though that's just a guess. I've never had to worry about performance at this point.

It sounds like you just need to do a bunch of idiot-checking before you execute certain lines of code, perhaps like checking to make sure $HOME is defined (or that your home directory exists) or whatever else before you proceed with your execute. In order to make any program work, you have to make some assumptions about the system it will be executed on. Even if you make an 'INSTALL' file that simply lists what the requirements are, if someone tries to use it that doesn't have suEXEC on, you can at least point out that it is a requirement, then at least they know what to ask for when they contact tech support (you?) for assistance.

Hope that helps.

In reply to Re: web-based installer wanderings by sierpinski
in thread web-based installer wanderings by skazat

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 scrutinizing the Monastery: (5)
As of 2024-04-24 22:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found