[Rt-commit] rt branch, 3.8/perlcritic, updated. rt-3.8.10-181-g837f4ac
Alex Vandiver
alexmv at bestpractical.com
Mon Jul 25 18:30:47 EDT 2011
The branch, 3.8/perlcritic has been updated
via 837f4ace7662f95bc592560dfa6fa785c071a28d (commit)
from e2813c7027f82c70b79db2d5c85d09795e434423 (commit)
Summary of changes:
lib/RT/Action/CreateTickets.pm | 2 +-
lib/RT/Graph/Tickets.pm | 2 +-
lib/RT/Interface/CLI.pm | 2 +-
lib/RT/Interface/Web.pm | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 837f4ace7662f95bc592560dfa6fa785c071a28d
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Jul 25 18:24:59 2011 -0400
Change occurrences of split( 'string', ... ) into split( /regex/, ... )
diff --git a/lib/RT/Action/CreateTickets.pm b/lib/RT/Action/CreateTickets.pm
index 5fd9028..11f9fa0 100755
--- a/lib/RT/Action/CreateTickets.pm
+++ b/lib/RT/Action/CreateTickets.pm
@@ -373,7 +373,7 @@ sub CreateByTemplate {
my ( $id, $transid, $msg )
= $T::Tickets{$template_id}->Create(%$ticketargs);
- foreach my $res ( split( '\n', $msg ) ) {
+ foreach my $res ( split /\n/, $msg ) {
push @results,
$T::Tickets{$template_id}
->loc( "Ticket [_1]", $T::Tickets{$template_id}->Id ) . ': '
diff --git a/lib/RT/Graph/Tickets.pm b/lib/RT/Graph/Tickets.pm
index 1bdfeb7..df47561 100644
--- a/lib/RT/Graph/Tickets.pm
+++ b/lib/RT/Graph/Tickets.pm
@@ -254,7 +254,7 @@ sub AddTicket {
if ( $fill ) {
$node_style{'fillcolor'} = $fill;
$node_style{'style'} ||= '';
- $node_style{'style'} = join ',', split( ',', $node_style{'style'} ), 'filled'
+ $node_style{'style'} = join ',', split( /,/, $node_style{'style'} ), 'filled'
unless $node_style{'style'} =~ /\bfilled\b/;
}
}
diff --git a/lib/RT/Interface/CLI.pm b/lib/RT/Interface/CLI.pm
index 3a6ed53..5a24497 100755
--- a/lib/RT/Interface/CLI.pm
+++ b/lib/RT/Interface/CLI.pm
@@ -206,7 +206,7 @@ sub GetMessageContent {
close ($fh) or die $!;
}
elsif ($args{'Content'}) {
- @lines = split('\n',$args{'Content'});
+ @lines = split /\n/, $args{'Content'};
}
#get us a tempfile.
my ($fh, $filename) = tempfile();
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index cc11c92..83a8792 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -795,7 +795,7 @@ sub PathIsSafe {
# downdirs than updirs. So as soon as we get a negative score
# (which means "breaking out" of the top level) we reject the path.
- my @components = split '/', $cleaned_up;
+ my @components = split m|/|, $cleaned_up;
my $score = 0;
for my $component (@components) {
if ($component eq '..') {
@@ -1267,7 +1267,7 @@ sub CreateTicket {
Abort($ErrMsg);
}
- push( @Actions, split( "\n", $ErrMsg ) );
+ push( @Actions, split( /\n/, $ErrMsg ) );
unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
Abort( "No permission to view newly created ticket #" . $Ticket->id . "." );
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list