Changeset 5001 for src/Pugs/Run
- Timestamp:
- 06/26/05 11:08:26 (3 years ago)
- svk:copy_cache_prev:
- 6856
- Files:
-
- 1 modified
-
src/Pugs/Run/Args.hs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Run/Args.hs
r3910 r5001 145 145 joinDashE :: [Arg] -> [Arg] 146 146 joinDashE [] = [] 147 joinDashE ((Switch 'p'):args) = joinDashE ((Opt "-e" "while ($_ = =<>) { chomp $_;"):script++[(Opt "-e" "; say $_; }")]++rest)147 joinDashE ((Switch 'p'):args) = joinDashE ((Opt "-e" "while ($_ = =<>) { $_ .= chomp;"):script++[(Opt "-e" "; say $_; }")]++rest) 148 148 where 149 149 (script,rest) = partition isDashE args 150 150 isDashE (Opt "-e" _) = True 151 151 isDashE (_) = False 152 joinDashE ((Switch 'n'):args) = joinDashE ((Opt "-e" "while ($_ = =<>) { chomp $_;"):script++[(Opt "-e" "}")]++rest)152 joinDashE ((Switch 'n'):args) = joinDashE ((Opt "-e" "while ($_ = =<>) { $_ .= chomp;"):script++[(Opt "-e" "}")]++rest) 153 153 where 154 154 (script,rest) = partition isDashE args
