Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
About perltidy in Emacs:
I'm not sure I understand, isn't that just a shell-command-on-region command after a mark-whole-buffer?

Yes, these are parts of the solution. The other parts are:

  • Be able to restrict the perltidy-run to the current function, or the current region (i.e. avoid cosmetic changes in untouched places of the file which mess up VC history)
  • Don't let .tdy and .ERR files mess up your source directories
  • Present the source before and after tidying in an ediff session (with a bit of fine print like re-using an existing ediff session, so that you can re-run the command from within the ediff session, e.g. after accepting some changes)

...And indeed, indenting can be a mess. But it is improving. That's what I get with "hot" cperl-mode.el and PBP settings. The closing braces are under the first nonspace character of the line containing the opening braces, which I find ok.

Note the newline before the last semicolon. This indicates that this semicolon is a new statement (or superfluous)!

for my $x (@x) { my %h = ( 'truncate' => { 'desc' => 'shorten a file', 'usage' => [ 'truncate FILEHANDLE,LENGTH', 'truncate EXPR,LENGTH', ] } ); } ;

In reply to Re^5: How has your coding style changed over the years? by haj
in thread How has your coding style changed over the years? by stevieb

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2023-10-01 02:26 GMT
Find Nodes?
    Voting Booth?

    No recent polls found