[Rt-commit] rt branch, 4.0-trunk, updated. rt-4.0.0rc4-36-g1797fc4
? sunnavy
sunnavy at bestpractical.com
Fri Feb 4 00:59:31 EST 2011
The branch, 4.0-trunk has been updated
via 1797fc48e8b08c3c5d466791ee34fa467a2c0ab7 (commit)
from b099e156ebaf9dc8372d1951763d7eb4cd2bf2c5 (commit)
Summary of changes:
bin/rt.in | 13 +++++--------
devel/factory | 4 ++--
devel/license_tag | 16 ++++++++--------
lib/RT/Handle.pm | 4 ++--
lib/RT/Installer.pm | 2 +-
lib/RT/Interface/CLI.pm | 4 ++--
lib/RT/Interface/Email.pm | 2 +-
lib/RT/Interface/Web.pm | 2 +-
lib/RT/Squish/CSS.pm | 2 +-
lib/RT/Test.pm | 12 ++++++------
lib/RT/Test/Apache.pm | 6 +++---
sbin/rt-setup-database.in | 4 ++--
sbin/rt-setup-fulltext-index.in | 2 +-
.../html/Admin/Tools/Shredder/Elements/PluginHelp | 2 +-
share/html/Install/index.html | 2 +-
t/mail/crypt-gnupg.t | 2 +-
t/mail/gateway.t | 14 +++++++-------
t/ticket/linking.t | 6 +++---
t/ticket/scrips_batch.t | 2 +-
t/web/attachment_encoding.t | 2 +-
t/web/command_line.t | 2 +-
21 files changed, 51 insertions(+), 54 deletions(-)
- Log -----------------------------------------------------------------
commit 1797fc48e8b08c3c5d466791ee34fa467a2c0ab7
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Feb 4 13:40:03 2011 +0800
add parens for open() call to avoid confusion; also with left 2-arg => 3-arg change
diff --git a/bin/rt.in b/bin/rt.in
index e2b39dd..e397fef 100755
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -1171,8 +1171,7 @@ sub submit {
my ($self, $file) = @_;
$file ||= $self->{file};
- open(my $handle, $file)
- or return 0;
+ open( my $handle, '<', $file ) or return 0;
$self->{file} = $file;
my $sids = $self->{sids} = {};
@@ -1191,8 +1190,7 @@ sub submit {
my ($self, $file) = shift;
$file ||= $self->{file};
- open(my $handle, ">$file")
- or return 0;
+ open( my $handle, '>', "$file" ) or return 0;
my $sids = $self->{sids};
foreach my $server (keys %$sids) {
@@ -1433,8 +1431,7 @@ sub parse_config_file {
my ($file) = @_;
local $_; # $_ may be aliased to a constant, from line 1163
- open(my $handle, $file)
- or return;
+ open( my $handle, '<', $file ) or return;
while (<$handle>) {
chomp;
@@ -1483,13 +1480,13 @@ sub vi {
local $/ = undef;
- open(my $handle, ">$file") || die "$file: $!\n";
+ open( my $handle, '>', $file ) or die "$file: $!\n";
print $handle $text;
close($handle);
system($editor, $file) && die "Couldn't run $editor.\n";
- open($handle, $file) || die "$file: $!\n";
+ open( $handle, '<', $file ) or die "$file: $!\n";
$text = <$handle>;
close($handle);
diff --git a/devel/factory b/devel/factory
index d59923e..6e696f8 100755
--- a/devel/factory
+++ b/devel/factory
@@ -346,11 +346,11 @@ $ClassAccessible
print "About to make $RecordClassPath, $CollectionClassPath\n";
`mkdir -p $path`;
- open( RECORD, ">>$RecordClassPath" );
+ open( RECORD, '>>', $RecordClassPath ) or die $!;
print RECORD $RecordClass;
close(RECORD);
- open( COL, ">>$CollectionClassPath" );
+ open( COL, '>>', $CollectionClassPath ) or die $!;
print COL $CollectionClass;
close(COL);
diff --git a/devel/license_tag b/devel/license_tag
index 9861553..5ac7ee6 100755
--- a/devel/license_tag
+++ b/devel/license_tag
@@ -112,7 +112,7 @@ sub tag_mason {
my $pm = $_;
return unless (-f $pm);
return if $pm =~ /images/ || $pm =~ /\.(?:png|jpe?g|gif)$/;
- open FILE, '<', $pm or die "Failed to open $pm";
+ open( FILE, '<', $pm ) or die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
print "$pm - ";
@@ -136,7 +136,7 @@ sub tag_mason {
- open FILE, '>', $pm or die "couldn't write new file";
+ open( FILE, '>', $pm ) or die "couldn't write new file";
print FILE $file;
close FILE;
@@ -145,7 +145,7 @@ sub tag_mason {
sub tag_makefile {
my $pm = shift;
- open FILE, '<', $pm or die "Failed to open $pm";
+ open( FILE, '<', $pm ) or die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
print "$pm - ";
@@ -169,7 +169,7 @@ sub tag_makefile {
- open FILE, '>', $pm or die "couldn't write new file";
+ open( FILE, '>', $pm ) or die "couldn't write new file";
print FILE $file;
close FILE;
@@ -179,7 +179,7 @@ sub tag_makefile {
sub tag_pm {
my $pm = $_;
next unless $pm =~ /\.pm/s;
- open FILE, '<', $pm or die "Failed to open $pm";
+ open( FILE, '<', $pm ) or die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
print "$pm - ";
@@ -203,7 +203,7 @@ sub tag_pm {
- open FILE, '>', $pm or die "couldn't write new file $pm";
+ open( FILE, '>', $pm ) or die "couldn't write new file $pm";
print FILE $file;
close FILE;
@@ -213,7 +213,7 @@ sub tag_pm {
sub tag_script {
my $pm = $_;
return unless (-f $pm);
- open FILE, '<', $pm or die "Failed to open $pm";
+ open( FILE, '<', $pm ) or die "Failed to open $pm";
my $file = (join "", <FILE>);
close (FILE);
print "$pm - ";
@@ -240,7 +240,7 @@ sub tag_script {
print "\n";
- open FILE, '>', $pm or die "couldn't write new file";
+ open( FILE, '>', $pm ) or die "couldn't write new file";
print FILE $file;
close FILE;
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 943d445..8fd63a4 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -462,10 +462,10 @@ sub InsertSchema {
my (@schema);
- open my $fh_schema, '<', $file or die $!;
+ open( my $fh_schema, '<', $file ) or die $!;
my $has_local = 0;
- open my $fh_schema_local, "<" . $self->GetVersionFile( $dbh, $RT::LocalEtcPath . "/schema." . $db_type )
+ open( my $fh_schema_local, "<" . $self->GetVersionFile( $dbh, $RT::LocalEtcPath . "/schema." . $db_type ))
and $has_local = 1;
my $statement = "";
diff --git a/lib/RT/Installer.pm b/lib/RT/Installer.pm
index c9ab7dd..97d3595 100644
--- a/lib/RT/Installer.pm
+++ b/lib/RT/Installer.pm
@@ -264,7 +264,7 @@ sub SaveConfig {
{
local $/;
- open my $fh, '<', $file or die $!;
+ open( my $fh, '<', $file ) or die $!;
$content = <$fh>;
$content =~ s/^\s*1;\s*$//m;
}
diff --git a/lib/RT/Interface/CLI.pm b/lib/RT/Interface/CLI.pm
index 21e23a9..1b044da 100644
--- a/lib/RT/Interface/CLI.pm
+++ b/lib/RT/Interface/CLI.pm
@@ -195,7 +195,7 @@ sub GetMessageContent {
#Load the sourcefile, if it's been handed to us
if ($source) {
- open SOURCE, '<', $source or die $!;
+ open( SOURCE, '<', $source ) or die $!;
@lines = (<SOURCE>);
close (SOURCE);
}
@@ -221,7 +221,7 @@ sub GetMessageContent {
system ($ENV{'EDITOR'}, $filename);
}
- open READ, '<', $filename or die $!;
+ open( READ, '<', $filename ) or die $!;
my @newlines = (<READ>);
close (READ);
diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index e4e2643..d07f9ad 100644
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -445,7 +445,7 @@ sub SendEmail {
# don't ignore CHLD signal to get proper exit code
local $SIG{'CHLD'} = 'DEFAULT';
- open my $mail, '|-', "$path $args" or die "couldn't execute program: $!";
+ open( my $mail, '|-', "$path $args" ) or die "couldn't execute program: $!";
# if something wrong with $mail->print we will get PIPE signal, handle it
local $SIG{'PIPE'} = sub { die "program unexpectedly closed pipe" };
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 7ec6139..fc5bc56 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -837,7 +837,7 @@ sub SendStaticFile {
$type ||= "application/octet-stream";
}
$HTML::Mason::Commands::r->content_type($type);
- open my $fh, '<', $file or die "couldn't open file: $!";
+ open( my $fh, '<', $file ) or die "couldn't open file: $!";
binmode($fh);
{
local $/ = \16384;
diff --git a/lib/RT/Squish/CSS.pm b/lib/RT/Squish/CSS.pm
index 15ffc04..166b8ef 100644
--- a/lib/RT/Squish/CSS.pm
+++ b/lib/RT/Squish/CSS.pm
@@ -88,7 +88,7 @@ sub file_handle {
my $self = shift;
my $file = shift;
my $content = $HTML::Mason::Commands::m->scomp("/NoAuth/css/$file") || '';
- open my $fh, '<', \$content or die "$!";
+ open( my $fh, '<', \$content ) or die $!;
return $fh;
}
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 5c81228..84d75c4 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -223,7 +223,7 @@ sub bootstrap_config {
$tmp{'config'}{'RT'} = File::Spec->catfile(
"$tmp{'directory'}", 'RT_SiteConfig.pm'
);
- open my $config, '>', $tmp{'config'}{'RT'}
+ open( my $config, '>', $tmp{'config'}{'RT'} )
or die "Couldn't open $tmp{'config'}{'RT'}: $!";
print $config qq{
@@ -261,7 +261,7 @@ Set( \$RTAddressRegexp , qr/^bad_re_that_doesnt_match\$/);
Set( \$MailCommand, sub {
my \$MIME = shift;
- open my \$handle, '>>', '$mail_catcher'
+ open( my \$handle, '>>', '$mail_catcher' )
or die "Unable to open '$mail_catcher' for appending: \$!";
\$MIME->print(\$handle);
@@ -291,7 +291,7 @@ sub bootstrap_logging {
$tmp{'log'}{'RT'} = File::Spec->catfile(
"$tmp{'directory'}", 'rt.debug.log'
);
- open my $fh, '>', $tmp{'log'}{'RT'}
+ open( my $fh, '>', $tmp{'log'}{'RT'} )
or die "Couldn't open $tmp{'config'}{'RT'}: $!";
# make world writable so apache under different user
# can write into it
@@ -322,7 +322,7 @@ sub set_config_wrapper {
SCALAR => '$',
);
my $sigil = $sigils{$type} || $sigils{'SCALAR'};
- open my $fh, '>>', $tmp{'config'}{'RT'}
+ open( my $fh, '>>', $tmp{'config'}{'RT'} )
or die "Couldn't open config file: $!";
require Data::Dumper;
local $Data::Dumper::Terse = 1;
@@ -924,7 +924,7 @@ sub open_mailgate_ok {
my $baseurl = shift;
my $queue = shift || 'general';
my $action = shift || 'correspond';
- Test::More::ok(open(my $mail, "|$RT::BinPath/rt-mailgate --url $baseurl --queue $queue --action $action"), "Opened the mailgate - $!");
+ Test::More::ok(open(my $mail, '|-', "$RT::BinPath/rt-mailgate --url $baseurl --queue $queue --action $action"), "Opened the mailgate - $!");
return $mail;
}
@@ -1305,7 +1305,7 @@ sub file_content {
Test::More::diag "reading content of '$path'" if $ENV{'TEST_VERBOSE'};
- open my $fh, "<:raw", $path
+ open( my $fh, "<:raw", $path )
or do {
warn "couldn't open file '$path': $!" unless $args{noexist};
return ''
diff --git a/lib/RT/Test/Apache.pm b/lib/RT/Test/Apache.pm
index ae40e4c..db80e6f 100644
--- a/lib/RT/Test/Apache.pm
+++ b/lib/RT/Test/Apache.pm
@@ -21,7 +21,7 @@ sub start_server {
my %info = $self->apache_server_info( variant => $variant );
RT::Test::diag(do {
- open my $fh, '<', $tmp{'config'}{'RT'};
+ open( my $fh, '<', $tmp{'config'}{'RT'} ) or die $!;
local $/;
<$fh>
});
@@ -68,7 +68,7 @@ sub start_server {
}
Test::More::BAIL_OUT("Couldn't start apache server, no pid file")
unless -e $opt{'pid_file'};
- open my $pid_fh, '<', $opt{'pid_file'}
+ open( my $pid_fh, '<', $opt{'pid_file'} )
or Test::More::BAIL_OUT("Couldn't open pid file: $!");
my $pid = <$pid_fh>;
chomp $pid;
@@ -186,7 +186,7 @@ sub process_in_file {
($out_fh, $out_conf) = tempfile();
} else {
$out_conf = $args{'out'};
- open $out_fh, '>', $out_conf
+ open( $out_fh, '>', $out_conf )
or die "couldn't open '$out_conf': $!";
}
print $out_fh $text;
diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index d104215..43b2e6b 100755
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -105,7 +105,7 @@ RT->InitClasses();
# get customized root password
my $root_password;
if ( $args{'root-password-file'} ) {
- open my $fh, '<', $args{'root-password-file'}
+ open( my $fh, '<', $args{'root-password-file'} )
or die "Couldn't open 'args{'root-password-file'}' for reading: $!";
$root_password = <$fh>;
chomp $root_password;
@@ -394,7 +394,7 @@ sub action_upgrade {
sub get_versions_from_to {
my ($base_dir, $from, $to) = @_;
- opendir my $dh, $base_dir or die "couldn't open dir: $!";
+ opendir( my $dh, $base_dir ) or die "couldn't open dir: $!";
my @versions = grep -d "$base_dir/$_" && /\d+\.\d+\.\d+/, readdir $dh;
closedir $dh;
diff --git a/sbin/rt-setup-fulltext-index.in b/sbin/rt-setup-fulltext-index.in
index 44947aa..5a48a22 100644
--- a/sbin/rt-setup-fulltext-index.in
+++ b/sbin/rt-setup-fulltext-index.in
@@ -390,7 +390,7 @@ sub ora_create_stop_list {
undef, $name, 'BASIC_STOPLIST'
);
- open my $fh, '<:utf8', $file
+ open( my $fh, '<:utf8', $file )
or die "couldn't open file '$file': $!";
while ( my $word = <$fh> ) {
chomp $word;
diff --git a/share/html/Admin/Tools/Shredder/Elements/PluginHelp b/share/html/Admin/Tools/Shredder/Elements/PluginHelp
index 491f955..a6ac9cf 100644
--- a/share/html/Admin/Tools/Shredder/Elements/PluginHelp
+++ b/share/html/Admin/Tools/Shredder/Elements/PluginHelp
@@ -65,7 +65,7 @@ unless( $file ) {
use RT::Shredder::POD qw();
my $text = '';
-open my $io_handle, ">:scalar", \$text or die "Can't open scalar for write: $!";
+open( my $io_handle, ">:scalar", \$text ) or die "Can't open scalar for write: $!";
RT::Shredder::POD::plugin_html( $file, $io_handle );
if ( $Plugin eq 'Base' ) {
$file =~ s/\.pm$/\/Search.pm/;
diff --git a/share/html/Install/index.html b/share/html/Install/index.html
index cc94003..653b32d 100644
--- a/share/html/Install/index.html
+++ b/share/html/Install/index.html
@@ -95,7 +95,7 @@ my $file = File::Spec->catfile( $RT::EtcPath, 'RT_SiteConfig.pm' );
if ( ! -e $file ) {
# write a blank RT_SiteConfig.pm
- open my $fh, '>', $file or die $!;
+ open( my $fh, '>', $file ) or die $!;
close $fh;
}
elsif ( ! -w $file ) {
diff --git a/t/mail/crypt-gnupg.t b/t/mail/crypt-gnupg.t
index cf69985..7c47d51 100644
--- a/t/mail/crypt-gnupg.t
+++ b/t/mail/crypt-gnupg.t
@@ -304,7 +304,7 @@ diag 'wrong signed/encrypted parts: wrong proto';
diag 'verify inline and in attachment signatures';
{
- open my $fh, '<', "$homedir/signed_old_style_with_attachment.eml" or die $!;
+ open( my $fh, '<', "$homedir/signed_old_style_with_attachment.eml" ) or die $!;
my $parser = new MIME::Parser;
my $entity = $parser->parse( $fh );
diff --git a/t/mail/gateway.t b/t/mail/gateway.t
index 279bbcd..9f0e669 100644
--- a/t/mail/gateway.t
+++ b/t/mail/gateway.t
@@ -656,7 +656,7 @@ ok( $id, 'new ticket created' );
is( $tick->Owner, RT->Nobody->Id, 'owner of the new ticket is nobody' );
$! = 0;
-ok(open(MAIL, "|$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action take"), "Opened the mailgate - $!");
+ok(open(MAIL, '|-', "$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action take"), "Opened the mailgate - $!");
print MAIL <<EOF;
From: root\@localhost
Subject: [@{[RT->Config->Get('rtname')]} \#$id] test
@@ -682,7 +682,7 @@ $m->no_warnings_ok;
$! = 0;
-ok(open(MAIL, "|$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action take-correspond"), "Opened the mailgate - $@");
+ok(open(MAIL, '|-', "$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action take-correspond"), "Opened the mailgate - $@");
print MAIL <<EOF;
From: root\@localhost
Subject: [@{[RT->Config->Get('rtname')]} \#$id] correspondence
@@ -709,7 +709,7 @@ $m->no_warnings_ok;
$! = 0;
-ok(open(MAIL, "|$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action resolve"), "Opened the mailgate - $!");
+ok(open(MAIL, '|-', "$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action resolve"), "Opened the mailgate - $!");
print MAIL <<EOF;
From: root\@localhost
Subject: [@{[RT->Config->Get('rtname')]} \#$id] test
@@ -745,7 +745,7 @@ my $rtname = RT->Config->Get('rtname');
$m->no_warnings_ok;
$! = 0;
-ok(open(MAIL, "|$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action take"), "Opened the mailgate - $!");
+ok(open(MAIL, '|-', "$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action take"), "Opened the mailgate - $!");
print MAIL <<EOF;
From: ext-mailgate\@localhost
Subject: [$rtname \#$id] test
@@ -767,7 +767,7 @@ $m->next_warning_like(qr/Could not record email: Ticket not taken/);
$m->no_leftover_warnings_ok;
$! = 0;
-ok(open(MAIL, "|$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action correspond-take"), "Opened the mailgate - $!");
+ok(open(MAIL, '|-', "$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action correspond-take"), "Opened the mailgate - $!");
print MAIL <<EOF;
From: ext-mailgate\@localhost
Subject: [$rtname \#$id] test
@@ -786,7 +786,7 @@ $m->next_warning_like(qr/Could not record email: Ticket not taken/);
$m->no_leftover_warnings_ok;
$! = 0;
-ok(open(MAIL, "|$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action take-correspond"), "Opened the mailgate - $!");
+ok(open(MAIL, '|-', "$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action take-correspond"), "Opened the mailgate - $!");
print MAIL <<EOF;
From: ext-mailgate\@localhost
Subject: [$rtname \#$id] test
@@ -831,7 +831,7 @@ ok( $status, "successfuly granted right: $msg" );
ok( $status, "successfuly granted right: $msg" );
$! = 0;
-ok(open(MAIL, "|$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action take-correspond"), "Opened the mailgate - $!");
+ok(open(MAIL, '|-', "$RT::BinPath/rt-mailgate --url $url --queue ext-mailgate --action take-correspond"), "Opened the mailgate - $!");
print MAIL <<EOF;
From: ext-mailgate\@localhost
Subject: [$rtname \#$id] test
diff --git a/t/ticket/linking.t b/t/ticket/linking.t
index d947fe5..b18340d 100644
--- a/t/ticket/linking.t
+++ b/t/ticket/linking.t
@@ -38,13 +38,13 @@ my $q2 = RT::Queue->new(RT->SystemUser);
ok ($id,$msg);
my $commit_code = <<END;
-open my \$file, '<', "$filename" or die "couldn't open $filename";
+open( my \$file, '<', "$filename" ) or die "couldn't open $filename";
my \$data = <\$file>;
\$data += 0;
close \$file;
\$RT::Logger->debug("Data is \$data");
-open \$file, '>', "$filename" or die "couldn't open $filename";
+open( \$file, '>', "$filename" ) or die "couldn't open $filename";
if (\$self->TransactionObj->Type eq 'AddLink') {
\$RT::Logger->debug("AddLink");
print \$file \$data+1, "\n";
@@ -391,7 +391,7 @@ ok($link->LocalBase == 0, "LocalBase set correctly");
sub link_count {
my $file = shift;
- open my $fh, '<', $file or die "couldn't open $file";
+ open( my $fh, '<', $file ) or die "couldn't open $file";
my $data = <$fh>;
close $fh;
diff --git a/t/ticket/scrips_batch.t b/t/ticket/scrips_batch.t
index 3edac53..1d28b67 100644
--- a/t/ticket/scrips_batch.t
+++ b/t/ticket/scrips_batch.t
@@ -43,7 +43,7 @@ my $sid;
my ($tmp_fh, $tmp_fn) = tempfile();
my $code = <<END;
-open my \$fh, '>', '$tmp_fn' or die "Couldn't open '$tmp_fn':\$!";
+open( my \$fh, '>', '$tmp_fn' ) or die "Couldn't open '$tmp_fn':\$!";
my \$batch = \$self->TicketObj->TransactionBatch;
unless ( \$batch && \@\$batch ) {
diff --git a/t/web/attachment_encoding.t b/t/web/attachment_encoding.t
index 992be17..2fe8200 100644
--- a/t/web/attachment_encoding.t
+++ b/t/web/attachment_encoding.t
@@ -46,7 +46,7 @@ diag 'test with attachemnts' if $ENV{TEST_VERBOSE};
my $file =
File::Spec->catfile( File::Spec->tmpdir, encode_utf8 'é件.txt' );
- open my $fh, '>', $file or die $!;
+ open( my $fh, '>', $file ) or die $!;
binmode $fh, ':utf8';
print $fh 'é件';
close $fh;
diff --git a/t/web/command_line.t b/t/web/command_line.t
index ee1ee7a..a1f0a19 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -508,7 +508,7 @@ sub check_attachment {
expect_handle->before() =~ $attachment_regex;
my $attachment_id = $1;
expect_send("show ticket/$ticket_id/attachments/$attachment_id/content","Fetching Attachment");
- open my $fh, '<', $attachment_path or die "Can't open $attachment_path: $!";
+ open( my $fh, '<', $attachment_path ) or die "Can't open $attachment_path: $!";
my $attachment_content = do { local($/); <$fh> };
close $fh;
chomp $attachment_content;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list