Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Re: Re: Mandatory indenting

by Anonymous Monk
on Jun 23, 2003 at 04:35 UTC ( #268050=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Mandatory indenting
in thread Mandatory indenting

tidy it again and see if it changes :)


Comment on Re: Re: Re: Re: Mandatory indenting
Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Mandatory indenting
by demerphq (Chancellor) on Jun 23, 2003 at 08:47 UTC

    Doh. :-)

    rotfl ++Anonny!


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
      rotfl ++Anonny!

      Thanks, no matter how hard I try I can't seem to make it past level 1 ;-)

Re^5: Mandatory indenting
by atcroft (Monsignor) on Jan 20, 2004 at 13:06 UTC

    An adaptation of this script might work in that regard. It was a shell script I hacked together to reformat occasionally as I worked on things. Given one or more files on the command line, it looks to see if there is a .tdy version of the file present (creating an empty one if not), checks if the current version and the .tdy version differ, and if so, performs a tidy (setting the lines 123 characters-personal preference), not replacing the original if a .ERR file was produced. The .tdy file was also left in place for future comparison.

    #!/bin/bash PERLTIDY='/usr/local/bin/perltidy -l 123 ' TOUCH=/bin/touch DIFF=/usr/bin/diff WC=/usr/bin/wc CP=/bin/cp if [ $# -gt 0 ] then echo Command line: $0 $@ for file in $@ do if [ ! -e $file.tdy ] then $TOUCH $file.tdy fi if [ `$DIFF -q $file $file.tdy | $WC -l` -gt 0 ] then $PERLTIDY $file if [ -e $file.ERR ] then echo Error detected-not replacing else $CP -v $file.tdy $file fi else echo Skipping $file - perltidy on file not necessary fi done else echo Usage: $0 filename fi

    Update (20 Jan 2004): Added absolute paths to utilities used, to prevent issues with pathing.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://268050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-08 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls