Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
It doesn't seem like such a fundamental difference to me.

Then you either haven't taken the time to think before commiting to that opinion, or you simply haven't bothered to consider the possibility that a unix behaviour could possibly be flawed.

Modifying the wrong hash element in an inhereted object can cause data loss.

Modifying the wrong hash element is entirely within the control of my application.

Overwriting or deleting a file created by a different application (or vice versa) is not.

Changing a global sub (such as you do here) can cause serious problems if not done with care.

I didn't "do it". I simply reminded someone else how Perl would let them do it, should they choose to.

And besides, all the behaviors of an operating system are controlled entirely within the auspices of one computer.

And if the files resides on a network drive or NFS mounted filesystem?

The difference I see is not fundamental, it is one of likelihood. The chances of problems caused by permissive behavior are less at the application level than the operating system level, but they are still there.

What makes the difference fundemental is that I can code my application to test for and avoid modifying the wrong hash element.

To safely rename a file requires that the OS detect and inform me about potential collisions, as any test I code into my application opens a race condition on a multi-tasking system.

My OS does this at the system API level. The thing that took me by surprise was that the Perl implementation chose to override this.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon

In reply to Re^6: A DWIM too far? by BrowserUk
in thread A DWIM too far? by BrowserUk

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 lurking in the Monastery: (6)
As of 2024-04-19 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found