Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I never use perltidy on my own code, but I use it in other people's code. ;-) While perltidy and I may not agree 100% of the time, it's at least >95%. Some people's coding style agree with mine 0%!
  • Seems to do the trick...
    • If you run perltidy on this:

      my %hash = (
          some_long_key => {
              INCLUDE_PATH => __PACKAGE__->path_to('www/templates/tt')
          }
      );

      ... and it doesn't change, then it's something else you're doing. Those two options by themselves generate this:

      my %hash =
      ( some_long_key =>
          { INCLUDE_PATH => __PACKAGE__->path_to('www/templates/tt') } );

  • This works for me: perltidy -l=64 -i=4 some_long_key.pl
  • I added an empty comment and it started working with just -i=4.
    my %hash = (
        some_long_key => {
            INCLUDE_PATH => __PACKAGE__->path_to('www/templates/tt')    #
        }
    );