On 10/5/06, Paul McCann <[EMAIL PROTECTED]> wrote:
Jay Savage wrote:

> I can't for the life of me figure how to get it to stop putting
> the '-w' flag on the shebang line. It also seems to occasionally eat
> my 'use warnings;' when it does it.

I've just tried to replicate this in TextMate (selecting "Tidy" via
the Perl bundle with a "use warnings;" line and no "-w" flag. A naked
called to "Tidy" --that is, I have no .perltidy file-- didn't change
anything except the indentation of some loops; do you still get the
overriding of warnings if you move your .perltidy aside? Just for the
record I have...

% perltidy --v
This is perltidy, v20060719
[...copyright stuff]

You beat me to it. I was just getting ready to follow up. As it turns
out, it's not perltidy; it's an insidious "feature" of TextMate. It
turns out that TextMate runs its filters on the file being edited--not
on the buffer. It then replaces the buffer with the output from the
filter.

In preparation for overhauling an inherited project, I was opening up
copies of some old files, modifying the shebang, adding 'use
warnings;' and running perltidy before I started editing in earnest.
When the '-w' kept reappearing, I thought it was perltidy being
didactic.

I turns out, though, that was was really happening was TextMate
silently throwing out my unsaved edits before passing the file off to
perltidy. Or after it got the file back from perltidy, whichever way
you want to look at it.

I'm just glad I hadn't made any important changes. The bug report is
in the mail. The correct behavior, IMO, would be to filter the buffer.
I'd settle, though, for a "you're about to clobber your unsaved
changes" diag.

-- jay
--------------------------------------------------
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.downloadsquad.com  http://www.engatiki.org

values of β will give rise to dom!

Reply via email to