PaulHowarth/Blog/2010-12-17

Friday 17th December 2010

Fedora Project

  • Became owner of trac-spamfilter-plugin after it was orphaned by JesseKeating

  • Updated perl-IO-Socket-SSL to 1.37 in F-13 and F-14, addressing CVE-2010-4334 (IO::Socket::SSL ignores user request for peer verification); this was already fixed in Rawhide

  • Updated spambayes to 1.1a6 in EPEL-6 (as per Rawhide and Fedora 14)

  • Updated trac-accountmanager-plugin to the current HEAD (revision 9591) of trunk (for use with trac 0.12.x) in Rawhide, and requested a new branch for EPEL-6

  • Updated trac-spamfilter-plugin to the current HEAD (revision 10366) of the 0.12 branch (for use with trac 0.12.x) in Rawhide and EPEL-6

Local Packages

  • Updated perl-Perl-Tidy to 20101217:

    • Added new flag -it=n or --iterations=n to make perltidy do n complete iterations. For most purposes the default of n=1 should be satisfactory. However, n=2 can be useful when a major style change is being made, or when code is being beautified on check-in to a source code control system. The run time will be approximately proportional to n, and it should seldom be necessary to use a value greater than n=2.

    • A configuration file pathname beginning with three dots, e.g. ".../.perltidyrc", indicates that the file should be searched for starting in the current directory and working upwards. This makes it easier to have multiple projects each with their own .perltidyrc in their root directories.

    • Added flag --notidy that disables all formatting and causes the input to be copied unchanged. This can be useful in conjunction with hierarchical .perltidyrc files to prevent unwanted tidying.

    • Added prefilters and postfilters in the call to the Tidy.pm module. The prefilter is a code reference that will be applied to the source before tidying, and the postfilter is a code reference to the result before outputting. This is useful for all manner of customizations, e.g. to convert the 'method' keyword to 'sub' so that perltidy will work for Method::Signature::Simple code:

    • Perl::Tidy::perltidy(
         prefilter => sub { $_ = $_[0]; s/^method (.*)/sub $1 \#__METHOD/gm; return $_ },
         postfilter => sub { $_ = $_[0]; s/^sub (.*?)\s* \#__METHOD/method $1/gm; return $_ }
      );
    • The starting indentation level of sections of code entabbed with -et=n is correctly guessed if it was also produced with the same -et=n flag. This keeps the indentation stable on repeated formatting passes within an editor.

    • Functions with prototype '&' had a space between the function and opening paren. This space now only occurs if the flag --space-function-paren (-sfp) is set.

    • Patch to never put spaces around a bare word in braces beginning with ^ as in:

    •    my $before = ${^PREMATCH};
    • even if requested with the -bt=0 flag because any spaces cause a syntax error in perl.


Recent