in reply to Re^7: magic-diamond <> behavior -- WHAT?!
in thread magic-diamond <> behavior -- WHAT?!

That's certainly a point. But here's also some difference -- man pages for both rm and scp explicitly mention these cases and how to workaround them, documentation for prove doesn't.

  • Comment on Re^8: magic-diamond <> behavior -- WHAT?!

Replies are listed 'Best First'.
Re^9: magic-diamond <> behavior -- WHAT?!
by JavaFan (Canon) on Oct 28, 2009 at 17:19 UTC
    Then fix the documentation! Changing Perl because documentation of applications is incorrect or incomplete isn't the way to go.
      Then fix the documentation!

      I think I should fix the scripts. I don't think that's their intended behavior.

      Changing Perl because documentation of applications is incorrect or incomplete isn't the way to go.

      To be clear. I don't actually propose to make this change, I understand that this would broke a lot of things including quite healthy scripts which use something like already mentioned

      BEGIN {s!^(\s)!./$1!,s/^/</,s/$/\0/ for @ARGV}
      Just in disagreement with your position I think that
      • this feature is not so useful
      • it's weird and error prone
      • it's make easy things harder
        My point is that if you want to make "robust" scripts, that is, scripts that need to be run in a potentially untrustworthy environment, should either enable taint, or use 3-arg open. Preferably both.

        Robbing Perl of a feature (and potentially breaking code) just so one can take short cuts in untrustworthy environments isn't the right thing to do.