Changeset 21654

Show
Ignore:
Timestamp:
07/31/08 16:58:59 (5 months ago)
Author:
fglock
Message:

[v6.pm] IO fixes

Location:
perl5/Pugs-Compiler-Perl6/lib/Pugs
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • perl5/Pugs-Compiler-Perl6/lib/Pugs/Emitter/Perl6/Perl5.pm

    r21650 r21654  
    16431643                } ); 
    16441644        } 
     1645        if (   exists $n->{exp2}{pair}  
     1646            && $n->{exp2}{pair}{key}{single_quoted} eq 'e' 
     1647            && $n->{exp2}{pair}{value}{num} eq 1 
     1648            )  
     1649        { 
     1650            #  $filename ~~ :e 
     1651            return "( -e " . _emit( $n->{exp1} ) . ")"; 
     1652        } 
    16451653        return _emit( $n->{exp1} ) . ' =~ (ref' . emit_parenthesis( $n->{exp2} ).' eq "Regexp" '. 
    16461654            ' ? '._emit($n->{exp2}). 
  • perl5/Pugs-Compiler-Perl6/lib/Pugs/Runtime/Perl6Prelude.pm

    r21577 r21654  
    2323# sub sleep($seconds) is export { use v5; CORE::sleep($seconds); use v6; } 
    2424 
    25 sub open($file) { use v5; my $fh = IO::File->new; $fh->open($file) || warn "can't open file $file"; $fh; use v6; } 
     25sub open($file, :$w? ) { use v5; my $fh = IO::File->new; $fh->open($file, ($w ? 'w' : ()) ) || warn "can't open file $file"; $fh; use v6; } 
    2626 
    2727module Pugs::Internals;