in reply to Re^2: Out of date over <> and 5.10 (redir)
in thread Out of date over <> and 5.10
Another is it screws up syntax highlighting.
Ah, yes, the piles of useful tools that I've seen discarded because they get in the way of the syntax coloring crutch continues to grow. I strongly prefer code that is easy to read without the need for colors, especially because I read code in lots of ways (in diff output, in patches, on printed pages, several different ways via revision control systems, etc.) that just don't support syntax coloring. I much prefer to be able to select my tools rather than have one fragile tool eliminating lots of other tools for me. But I realize that this places me in a small minority.
I also don't use Perl::Tidy (for similar reasons: it is rather fragile and I've seen people discard tools because they confuse the poor thing, just as you have, but also because I just don't find much benefit to it). And so using pl2bat doesn't actually require much of any "discipline" for me.
Once you have PATHEXT/ASSOC/FTYPE set up correctly, everything "Just works".
Not for everybody, at least not if you want to use piping or redirection. Or did you already forget the reason for this very thread?
And setting it up is a one-time deal.
Ah, the luxury of only ever running your code on a single computer. I'm now at a job where I have the luxury of not having to deal with a large and ever-growing list of Windows-based computers (the list of Windows-based computers I must deal with is quite small and grows only very slowly).
I also like the multiple side-by-side perl installs that it affords through the simple mechanism of using different extensions .pl for 5.latest, .pl8 for 5.8 etc.
s/simple mechanism/awkward hack/, IMHO. It must take some discipline to come up with a new extension for each new install of Perl and then to remember to update your syntax coloring configuration so that it knows about this growing list of custom extensions. ;) Using something like pl2bat means you pick which Perl to use by actually specifying the perl to use in the script, much like a #! line under Unix. pl2bat doesn't prevent using side-by-side Perl installs. It just affords them in a more straight-forward way.
I also like being able to use bl2bat-wrapped Perl scripts to change the environment or working directory of the calling command prompt (I've posted quite a few of those here). It is also useful for making scripts that can be used by my co-workers even if they don't have Perl installed on their Windows box (because my install of Perl is available via a network share).
By no means am I trying to convince you (or anyone, really) to use pl2bat. I'm just noting why, for me, the down side is so small (just the "Terminate batch job" prompting) and the up side well worth it. :)
- tye
|
|---|