perltidy and -w flag

2006-10-05 Thread Jay Savage

I've recently started using TextMaker to edit my Perl scripts after
many years of Emacs. On the whole I'm happy, but one thing really bugs
me: styling. I've never really used perltidy before--Emacs perl-mode
and cperl-mode have done everything I wanted. TextMate, though, uses
perltidy internally. I've got my flags pretty well set in ~/.perltidy,
but 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.

Any thoughts?

Thanks,

-- 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!


Re: perltidy and -w flag

2006-10-05 Thread Joseph Alotta

Some people like TextMate also.  I think it costs $29.

www.macromates.com/


Joe.



On Oct 5, 2006, at 1:21 PM, Ted Zeng wrote:

BBedit has a free version called textwrangler. You can download  
from their site.




It is a very good editor.



Ted zeng



From: Michael Barto [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 05, 2006 10:56 AM
To: Jay Savage; macosx@perl.org
Subject: Re: perltidy and -w flag



I know a lot of people that use Emacs on other Platforms because  
they have nothing else. But this is on a Mac and you have a lot of  
good well designed choices:


BBedit is the most popular. Try the demo for a month and you will  
be sold. A student license is $50.00 (http://www.barebones.com/).   
I use Perl to generate Web pages with Javascript. Besides debugging  
the Perl code as I write, BBedit has an instantaneous Web page  
preview of my code which is awesome. You change an entry, it  
instantaneous updates.
There is another soruce editing program called AlphaX (Freeware).  
It has been around for a long time and is wonderful to do Perl  
Editing (http://www.maths.mq.edu.au/~steffen/Alpha/AlphaX/). It  
contains extensive Perl code help documentation.
There is a great Perl Editor/Debugger called Affrus (http:// 
www.latenightsw.com/affrus/) which integrates with BBEdit or is  
standalone. I use it find the really complex issues, since when it  
steps throught the code it shows me what is going on in memory in a  
really nice graphical way, etc. Unfortunately it is expensive  
(around $100.00)


In all these editors, they have run at command line drop down,  
which is where I put my #!/bin/perl -w which is in my program. I  
have enclode the BBedit one as an example. Since Alpha is basically  
free right now,




Jay Savage wrote:


I've recently started using TextMaker to edit my Perl scripts after
many years of Emacs. On the whole I'm happy, but one thing really bugs
me: styling. I've never really used perltidy before--Emacs perl-mode
and cperl-mode have done everything I wanted. TextMate, though, uses
perltidy internally. I've got my flags pretty well set in ~/.perltidy,
but 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.

Any thoughts?

Thanks,

-- 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!



--

Michael Barto
Software Architect

image001.gif

LogiQwest Inc.
16458 Bolsa Chica Street, # 15
Huntington Beach, CA  92649
http://www.logiqwest.com/



[EMAIL PROTECTED]
Tel:  714 377 3705
Fax: 714 840 3937
Cell: 714 883 1949

'tis a gift to be simple

This e-mail may contain LogiQwest proprietary information and  
should be treated as confidential.









Re: perltidy and -w flag

2006-10-05 Thread Sherm Pendley
Guys, how is any of this even a tiny bit relevant to the question Jay  
asked? Jay didn't ask what your favorite editor is, he asked how to  
configure perltidy to not add -w to his scripts, and leave his use  
warnings; line alone.


I don't know what the answer *is* - I dug through all of the perltidy  
docs, faqs, and recipe books I could lay hands on, and didn't find  
any relevant options. But I can say with 99% certainty that switching  
editors is *not* the answer. Perltidy opens a Perl file, reads and  
formats it, and prints out the results. It couldn't care less what  
editor you used to create the original.


sherm--

On Oct 5, 2006, at 3:34 PM, Joseph Alotta wrote:


Some people like TextMate also.  I think it costs $29.

www.macromates.com/


Joe.



On Oct 5, 2006, at 1:21 PM, Ted Zeng wrote:

BBedit has a free version called textwrangler. You can download  
from their site.




It is a very good editor.



Ted zeng



From: Michael Barto [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 05, 2006 10:56 AM
To: Jay Savage; macosx@perl.org
Subject: Re: perltidy and -w flag



I know a lot of people that use Emacs on other Platforms because  
they have nothing else. But this is on a Mac and you have a lot of  
good well designed choices:


BBedit is the most popular. Try the demo for a month and you will  
be sold. A student license is $50.00 (http://www.barebones.com/).   
I use Perl to generate Web pages with Javascript. Besides  
debugging the Perl code as I write, BBedit has an instantaneous  
Web page preview of my code which is awesome. You change an entry,  
it instantaneous updates.
There is another soruce editing program called AlphaX (Freeware).  
It has been around for a long time and is wonderful to do Perl  
Editing (http://www.maths.mq.edu.au/~steffen/Alpha/AlphaX/). It  
contains extensive Perl code help documentation.
There is a great Perl Editor/Debugger called Affrus (http:// 
www.latenightsw.com/affrus/) which integrates with BBEdit or is  
standalone. I use it find the really complex issues, since when it  
steps throught the code it shows me what is going on in memory in  
a really nice graphical way, etc. Unfortunately it is expensive  
(around $100.00)


In all these editors, they have run at command line drop down,  
which is where I put my #!/bin/perl -w which is in my program. I  
have enclode the BBedit one as an example. Since Alpha is  
basically free right now,




Jay Savage wrote:


I've recently started using TextMaker to edit my Perl scripts after
many years of Emacs. On the whole I'm happy, but one thing really  
bugs

me: styling. I've never really used perltidy before--Emacs perl-mode
and cperl-mode have done everything I wanted. TextMate, though, uses
perltidy internally. I've got my flags pretty well set in  
~/.perltidy,

but 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.

Any thoughts?

Thanks,

-- 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!



--

Michael Barto
Software Architect

image001.gif

LogiQwest Inc.
16458 Bolsa Chica Street, # 15
Huntington Beach, CA  92649
http://www.logiqwest.com/



[EMAIL PROTECTED]
Tel:  714 377 3705
Fax: 714 840 3937
Cell: 714 883 1949

'tis a gift to be simple

This e-mail may contain LogiQwest proprietary information and  
should be treated as confidential.









Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net




Re: perltidy and -w flag

2006-10-05 Thread Jay Savage

On 10/5/06, Joseph Alotta [EMAIL PROTECTED] wrote:

Some people like TextMate also.  I think it costs $29.

www.macromates.com/


Joe.




The results of a long night coding and not enough coffee...I've meant
TextMate all along.

Tonight: sleep.

--j
--
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!


Re: perltidy and -w flag

2006-10-05 Thread Paul McCann

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]

Regards,
Paul


Re: perltidy and -w flag

2006-10-05 Thread Jay Savage

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!