X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fsbin%2Fextract-message-catalog;h=f6a7f85050d0b41c86bcfae3bb93867bc4738ae9;hb=b6dbe0f12dbbe4ea5209367f905f937789b5b607;hp=022b5b2a9cebaf114b67ac6b0b3209714433346d;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/sbin/extract-message-catalog b/rt/sbin/extract-message-catalog index 022b5b2a9..f6a7f8505 100644 --- a/rt/sbin/extract-message-catalog +++ b/rt/sbin/extract-message-catalog @@ -120,7 +120,7 @@ sub extract_strings_from_code { $filename =~ s'^\./''; $filename =~ s'\.in$''; - unless (open _, $file) { + unless (open _, '<', $file) { print "Cannot open $file for reading ($!), skipping.\n"; return; } @@ -249,7 +249,7 @@ sub update { print "Updating $lang...\n"; my @lines; - @lines = () if open (LEXICON, $file); + @lines = () if open LEXICON, '<', $file; @lines = grep { !/^(#(:|\.)\s*|$)/ } @lines; while (@lines) { my $msghdr = ""; @@ -343,7 +343,7 @@ sub update { $out .= 'msgid ' . fmt($_) . "msgstr \"$Lexicon{$_}\"\n\n"; } - open PO, ">$file" or die "Couldn't open '$file' for writing: $!"; + open( PO, '>', $file ) or die "Couldn't open '$file' for writing: $!"; print PO $out; close PO;