]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
CGI/bug.pl: Tidy
authorIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 10:13:07 +0000 (11:13 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 10:13:07 +0000 (11:13 +0100)
CGI/bug.pl

index 8c5a4525e9c3187f0b914a559ceddc091ef3dc0a..4ebced82b8bc64ff4b24607f7dc5955f563a7086 100755 (executable)
@@ -52,13 +52,15 @@ fourohfour() unless $bug;
 
 my %handlers = (
     mbox => {
-        Header => sub () { print header( -type => 'application/mbox', -charset => 'utf-8', ); },
+        Header => sub () {
+            print header( -type => 'application/mbox', -charset => 'utf-8', );
+        },
         Message => sub ($) {
             my $m = shift;
             eval {
                 my $fh;
 
-                # Could forge a placeholder for messages which aren't present here.
+             # Could forge a placeholder for messages which aren't present here.
 
                 $fh = $m->headers;
                 print for (<$fh>);
@@ -68,6 +70,7 @@ my %handlers = (
                 $fh = $m->body;
                 print for (<$fh>);
             };
+
             # Ignore errors...
         },
         Footer => sub () { }
@@ -77,7 +80,9 @@ my %handlers = (
             print header( -charset => 'utf-8', );
 
             print start_html(
-                -title => $c{TrackerName} . ": #$bugid - " . htmlsanit( $bug->{title} ),
+                -title => $c{TrackerName}
+                  . ": #$bugid - "
+                  . htmlsanit( $bug->{title} ),
                 -style => { 'src' => $c{StyleSheet} }
             );
 
@@ -85,7 +90,8 @@ my %handlers = (
             print "\n";
 
             sub fmtdate ($) {
-                return htmlsanit( strftime( "%a %b %e %H:%M:%S %Y", gmtime(shift) ) );
+                return htmlsanit(
+                    strftime( "%a %b %e %H:%M:%S %Y", gmtime(shift) ) );
             }
 
             my $creationdate   = fmtdate( $bug->{creationdate} );
@@ -98,7 +104,8 @@ my %handlers = (
                         "Date: " . htmlsanit($creationdate),
                         "Last Update: " . htmlsanit($lastchangedate),
                         "Severity: " . htmlsanit( $bug->{severity} ),
-                        "Affects: " . htmlsanit( join( ", ", $bug->tags("affects") ) ),
+                        "Affects: "
+                          . htmlsanit( join( ", ", $bug->tags("affects") ) ),
                         "State: " . b( $bug->{open} ? "Open" : "Closed" )
                     ]
                 )
@@ -112,7 +119,7 @@ my %handlers = (
 
             print "\n";
         },
-        Message => sub ($) { format_html(shift, $bug); print hr . "\n" },
+        Message => sub ($) { format_html( shift, $bug ); print hr . "\n" },
         Footer => sub () { print end_html }
     }
 );