Browse files

Perlito5 - perl5: require v5.10 just in case, because we might use "w…

…hen"
  • Loading branch information...
1 parent 01f10ab commit dd2fe0325260e8088343c62270959f8d0952065e @fglock committed Apr 20, 2012
Showing with 6 additions and 2 deletions.
  1. +4 −0 ChangeLog
  2. +1 −1 lib5/Perlito5/Perl5/Emitter.pm
  3. +1 −1 src5/lib/Perlito5/Perl5/Emitter.pm
View
4 ChangeLog
@@ -18,6 +18,10 @@ dev 2012-04-12
-- more file and process operations: chdir, unlink, close, exit
-- more functions: rand
+- perl5 backend:
+
+-- require v5.10 just in case, because we might use 'when'
+
* Perlito6 (Perl 6 compiler):
View
2 lib5/Perlito5/Perl5/Emitter.pm
@@ -52,7 +52,7 @@ do { for ($_) {
};
sub Perlito5::AST::CompUnit::emit_perl5_program {
((my $comp_units) = $_[0]);
- ((my $str) = ('' . 'use v5;' . chr(10) . 'use Perlito5::Perl5::Runtime;' . chr(10)));
+ ((my $str) = ('' . 'use v5.10;' . chr(10) . 'use Perlito5::Perl5::Runtime;' . chr(10)));
for my $comp_unit (@{$comp_units}) {
($str = ($str . $comp_unit->emit_perl5(0)))
};
View
2 src5/lib/Perlito5/Perl5/Emitter.pm
@@ -90,7 +90,7 @@ package Perlito5::AST::CompUnit;
my $comp_units = $_[0];
my $str = ''
- . "use v5;\n"
+ . "use v5.10;\n" # just in case, because we might use 'when'
. "use Perlito5::Perl5::Runtime;\n";
for my $comp_unit (@{$comp_units}) {
$str .= $comp_unit->emit_perl5(0)

0 comments on commit dd2fe03

Please sign in to comment.