[svn:parrot] r46292 - trunk/tools/docs
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Tue May 4 22:59:57 UTC 2010
Author: chromatic
Date: Tue May 4 22:59:57 2010
New Revision: 46292
URL: https://trac.parrot.org/parrot/changeset/46292
Log:
[tools] Made tools/docs/filename_and_chapter.pl pass Perl::Critic tests.
Modified:
trunk/tools/docs/filename_and_chapter.pl
Modified: trunk/tools/docs/filename_and_chapter.pl
==============================================================================
--- trunk/tools/docs/filename_and_chapter.pl Tue May 4 22:41:27 2010 (r46291)
+++ trunk/tools/docs/filename_and_chapter.pl Tue May 4 22:59:57 2010 (r46292)
@@ -67,24 +67,21 @@
my $icnt;
open( my $IN_FH, '<', $item_list_ref->[$_[0]][0] ) or
- die( "$0: can't open $item_list_ref->[$_[0]][0] for reading ($!)\n" );
- open( OUT_FH, ">${MOD_BUILD_PATH}$item_list_ref->[$_[0]][0]" );
+ die "$0: can't open $item_list_ref->[$_[0]][0] for reading ($!)\n";
+ open( my $OUT_FH, '>', "${MOD_BUILD_PATH}$item_list_ref->[$_[0]][0]" ) or
+ die "$0: can't open ${MOD_BUILD_PATH}$item_list_ref->[$_[0]][0]: $!\n";
# do the same as: sed -e '4,6c\=head0 $item_list_ref->[$i][1]'
while( <$IN_FH> ) {
if ( $icnt = (4..6) ) {
if ( $icnt =~ /E0$/ ) {
- print( OUT_FH "=head0 $item_list_ref->[$_[0]][1]\n");
+ print $OUT_FH "=head0 $item_list_ref->[$_[0]][1]\n";
}
}
- else { print( OUT_FH ); }
+ else { print $OUT_FH $_ }
}
-
- close( $IN_FH );
- close( OUT_FH );
}
-
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
More information about the parrot-commits
mailing list