[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-257-g8940959

Jesse Vincent jesse at bestpractical.com
Tue Feb 15 14:57:30 EST 2011


The branch, 3.8-trunk has been updated
       via  89409590b6e9ba0efb4d353af9fabdc36f45f62c (commit)
       via  c29cd8bdb0e0b0390b3784a6e0c0621cb86183cf (commit)
       via  3384147ca2c58833db4d7c6b2c1f2a226329d842 (commit)
       via  201632a8977c019f7d5425784d3fcd7d7149854e (commit)
       via  0a39766a21dfc299fbdf1319724a500d67a7ccf3 (commit)
       via  df0937185d2de222403c2a41077ef7aaf2332993 (commit)
       via  e6520d2da78614cb8079a370cdac87f66d57c5bb (commit)
      from  692e7c103a52db9f47fab5e7f81abb20504b2e88 (commit)

Summary of changes:
 bin/rt-mailgate.in                    |    2 +-
 lib/RT/ACE_Overlay.pm                 |    2 +-
 lib/RT/Config.pm                      |    3 ++-
 lib/RT/Interface/CLI.pm               |    8 ++++----
 lib/RT/Shredder/Plugin.pm             |    3 ++-
 lib/RT/Shredder/Plugin/Base/Search.pm |    3 ++-
 sbin/rt-validator.in                  |    3 ++-
 7 files changed, 14 insertions(+), 10 deletions(-)

- Log -----------------------------------------------------------------
commit e6520d2da78614cb8079a370cdac87f66d57c5bb
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 15 14:01:12 2011 -0500

    close($fh) or die $!

diff --git a/lib/RT/Interface/CLI.pm b/lib/RT/Interface/CLI.pm
index af3de59..c825c23 100755
--- a/lib/RT/Interface/CLI.pm
+++ b/lib/RT/Interface/CLI.pm
@@ -201,8 +201,8 @@ sub GetMessageContent {
     #Load the sourcefile, if it's been handed to us
     if ($source) {
     open( SOURCE, '<', $source ) or die $!;
-	@lines = (<SOURCE>);
-	close (SOURCE);
+	@lines = (<SOURCE>) or die $!;
+	close (SOURCE) or die $!;
     }
     elsif ($args{'Content'}) {
 	@lines = split('\n',$args{'Content'});
@@ -214,7 +214,7 @@ sub GetMessageContent {
     for (@lines) {
 	print $fh $_;
     }
-    close ($fh);
+    close ($fh) or die $!;
     
     #Edit the file if we need to
     if ($edit) {	
@@ -228,7 +228,7 @@ sub GetMessageContent {
     
     open( READ, '<', $filename ) or die $!;
     my @newlines = (<READ>);
-    close (READ);
+    close (READ) or die $!;
 
     unlink ($filename) unless (debug());
     return(\@newlines);

commit df0937185d2de222403c2a41077ef7aaf2332993
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 15 14:02:55 2011 -0500

    UNIVERSAL::can now used as a method

diff --git a/lib/RT/ACE_Overlay.pm b/lib/RT/ACE_Overlay.pm
index 64c7d68..6b14a67 100755
--- a/lib/RT/ACE_Overlay.pm
+++ b/lib/RT/ACE_Overlay.pm
@@ -722,7 +722,7 @@ sub _ParseObjectArg {
     if( $args{'Object'} && ($args{'ObjectId'} || $args{'ObjectType'}) ) {
 	$RT::Logger->crit( "Method called with an ObjectType or an ObjectId and Object args" );
 	return ();
-    } elsif( $args{'Object'} && !UNIVERSAL::can($args{'Object'},'id') ) {
+    } elsif( $args{'Object'} && ref($args{'Object'}) &&  !$args{'Object'}->can('id') ) {
 	$RT::Logger->crit( "Method called called Object that has no id method" );
 	return ();
     } elsif( $args{'Object'} ) {

commit 0a39766a21dfc299fbdf1319724a500d67a7ccf3
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 15 14:07:14 2011 -0500

    Use a temporary variable to avoid a perlcritic complaint about
    "returnsort"

diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index ad35b28..94ca997 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -898,10 +898,11 @@ sub Meta {
 sub Sections {
     my $self = shift;
     my %seen;
-    return sort
+    my @sections = sort
         grep !$seen{$_}++,
         map $_->{'Section'} || 'General',
         values %META;
+    return @sections;
 }
 
 sub Options {

commit 201632a8977c019f7d5425784d3fcd7d7149854e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 15 14:07:53 2011 -0500

    Remove a <> that perlcritic complains about

diff --git a/sbin/rt-validator.in b/sbin/rt-validator.in
index 42b9296..2e19fbd 100644
--- a/sbin/rt-validator.in
+++ b/sbin/rt-validator.in
@@ -122,7 +122,8 @@ In any case it's highly recommended to have a backup before resolving anything.
 
 Press enter to continue.
 END
-    <>;
+# Read a line of text, any line of text
+    <STDIN>;
 }
 
 use RT;

commit 3384147ca2c58833db4d7c6b2c1f2a226329d842
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 15 14:08:28 2011 -0500

    Work around a complaint by critic that $1 was used outside a conditional

diff --git a/lib/RT/Shredder/Plugin.pm b/lib/RT/Shredder/Plugin.pm
index 2567f1b..7b2c413 100644
--- a/lib/RT/Shredder/Plugin.pm
+++ b/lib/RT/Shredder/Plugin.pm
@@ -46,6 +46,7 @@
 # 
 # END BPS TAGGED BLOCK }}}
 
+
 package RT::Shredder::Plugin;
 
 use strict;
@@ -127,7 +128,7 @@ sub List
         push @files, glob $mask;
     }
 
-    my %res = map { $_ =~ m/([^\\\/]+)\.pm$/; $1 => $_ } reverse @files;
+    my %res = map { if ( $_ =~ m/([^\\\/]+)\.pm$/) { $1 => $_ } } reverse @files;
 
     return %res unless $type;
 

commit c29cd8bdb0e0b0390b3784a6e0c0621cb86183cf
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 15 14:14:01 2011 -0500

    use STDIN instead of <> to make critic happier, although our usage was
    protected against what critic was worrying about.

diff --git a/bin/rt-mailgate.in b/bin/rt-mailgate.in
index 9dc800f..e67c7b0 100755
--- a/bin/rt-mailgate.in
+++ b/bin/rt-mailgate.in
@@ -186,7 +186,7 @@ sub write_down_message {
         print STDERR "$0: Couldn't create temp file, using memory\n";
         print STDERR "error: $@\n" if $@;
 
-        my $message = \do { local (@ARGV, $/); <> };
+        my $message = \do { local (@ARGV, $/); <STDIN> };
         unless ( $$message =~ /\S/ ) {
             print STDERR "$0: no message passed on STDIN\n";
             exit 0;

commit 89409590b6e9ba0efb4d353af9fabdc36f45f62c
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Feb 15 14:41:42 2011 -0500

    Remove a "return sort" to make shredder happy

diff --git a/lib/RT/Shredder/Plugin/Base/Search.pm b/lib/RT/Shredder/Plugin/Base/Search.pm
index e70b598..6bc609e 100644
--- a/lib/RT/Shredder/Plugin/Base/Search.pm
+++ b/lib/RT/Shredder/Plugin/Base/Search.pm
@@ -76,10 +76,11 @@ Allow you to limit search results. B<< Default value is C<10> >>.
 sub SupportArgs
 {
     my %seen;
-    return sort
+    my @args = sort
         grep $_ && !$seen{$_},
             shift->SUPER::SupportArgs(@_),
             qw(limit);
+    return @args;
 }
 
 sub TestArgs

-----------------------------------------------------------------------


More information about the Rt-commit mailing list