Changeset 5001 for src/Pugs/Run

Show
Ignore:
Timestamp:
06/26/05 11:08:26 (3 years ago)
Author:
iblech
svk:copy_cache_prev:
6856
Message:

Fixed chomp($str) to not edit $str inplace.
* Pugs.Prim -- Fixed the implementation of &chomp.
* examples/, ext/, t/, src/perl6/Prelude/PIR.pm, Makefile.PL -- Test fixes.
* Added note about chomp's new behaviour to docs/quickref/data.

Renamed ext/WTemplate/readme to ext/WTemplate/README (consitency).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Run/Args.hs

    r3910 r5001  
    145145joinDashE :: [Arg] -> [Arg] 
    146146joinDashE [] = [] 
    147 joinDashE ((Switch 'p'):args) = joinDashE ((Opt "-e" "while ($_ = =<>) { chomp $_;"):script++[(Opt "-e" "; say $_; }")]++rest) 
     147joinDashE ((Switch 'p'):args) = joinDashE ((Opt "-e" "while ($_ = =<>) { $_ .= chomp;"):script++[(Opt "-e" "; say $_; }")]++rest) 
    148148                                 where 
    149149                                   (script,rest) = partition isDashE args 
    150150                                   isDashE (Opt "-e" _) = True 
    151151                                   isDashE (_) = False 
    152 joinDashE ((Switch 'n'):args) = joinDashE ((Opt "-e" "while ($_ = =<>) { chomp $_;"):script++[(Opt "-e" "}")]++rest) 
     152joinDashE ((Switch 'n'):args) = joinDashE ((Opt "-e" "while ($_ = =<>) { $_ .= chomp;"):script++[(Opt "-e" "}")]++rest) 
    153153                                 where 
    154154                                   (script,rest) = partition isDashE args