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

Re: How to copy/cut and paste files without using modules ?

by CountZero (Bishop)
on Oct 20, 2011 at 14:06 UTC ( [id://932665]=note: print w/replies, xml ) Need Help??


in reply to How to copy/cut and paste files without using modules ?

A question which contains something like "How can I do ABC without using XYZ" always makes me wonder why such apparently arbitrary restrictions are imposed?

What is wrong with using a module? The very existence of CPAN with its unique wealth of modules extending the power of Perl is something which makes all other programming languages envious, so why should you not take advantage of it?

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: How to copy/cut and paste files without using modules ?

Replies are listed 'Best First'.
Re^2: How to copy/cut and paste files without using modules ?
by palkia (Monk) on Oct 20, 2011 at 21:26 UTC
    The apparently arbitrary restrictions, are very far from being arbitrary.
    There's nothing wrong with using modules (I use many myself),
    but as a perl nub, an "I want X done" isn't my entire interest, but a more "how does it work" wondering,
    both for theoretical and practical purposes.

    Also the more fundamental the code is, the greater its implementation potential is,
    the less likely it is to surprise the user (by run/intent errors), and the easier it is to be customize to the exact desired purpose for which it is required.

    A less common reason to avoid modules (I faced) is when planning to convert the pl file to something else (like exe) once it's done,
    but your converter can't handle modules correctly.

    Generally when writing a long and complicated program, a module can be a huge time (& headache) saver,
    but whenever using a module can be avoided (with a reasonable cost), a diy is always my choice.
      Studying the source code of the modules is a great way of learning Perl.

      What "Perl-to-exe" converter are you talking about?

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        I've tried:
        * perl2exe of indigoStar
        * the pp module
        * Cava Packager 2.0
        the last one seems to work with modules but it makes the exe huge in size for no obvious reason.
        I've actually asked about the perk2exe topic several times but never found an idle (& free) solution.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found