Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rakudo doesn't accept several -e options (but Perl 5 does) #1625

Closed
p6rt opened this issue Mar 24, 2010 · 8 comments
Closed

Rakudo doesn't accept several -e options (but Perl 5 does) #1625

p6rt opened this issue Mar 24, 2010 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Mar 24, 2010

Migrated from rt.perl.org#73790 (status was 'resolved')

Searchable as RT73790$

@p6rt
Copy link
Author

p6rt commented Mar 24, 2010

From @masak

$ perl -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH HAI
OH BAI BAI

$ perl6 -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH BAI BAI

So Perl 6 doesn't behave like Perl 5 (and sed and lots of other
programs accepting the -e option). S19​:427 even says that chaining -e
options together should work.

@p6rt
Copy link
Author

p6rt commented Jan 30, 2012

From @coke

On Wed Mar 24 07​:00​:23 2010, masak wrote​:

$ perl -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH HAI
OH BAI BAI

$ perl6 -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH BAI BAI

So Perl 6 doesn't behave like Perl 5 (and sed and lots of other
programs accepting the -e option). S19​:427 even says that chaining -e
options together should work.

Behavior has changed​: rakudo is now running the first -e, not the last​:

$ ./perl6 -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH HAI

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jan 30, 2012

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 4, 2014

From @peschwa

Am Mo 30. Jan 2012, 06​:11​:05, coke schrieb​:

On Wed Mar 24 07​:00​:23 2010, masak wrote​:

$ perl -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH HAI
OH BAI BAI

$ perl6 -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH BAI BAI

So Perl 6 doesn't behave like Perl 5 (and sed and lots of other
programs accepting the -e option). S19​:427 even says that chaining -e
options together should work.

Behavior has changed​: rakudo is now running the first -e, not the last​:

$ ./perl6 -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH HAI

A PR for this issue exists at [0]. Tests have not yet been added to roast, at least not by me.

[0] Raku/nqp#190

@p6rt
Copy link
Author

p6rt commented Oct 5, 2014

From @peschwa

Am Sa 04. Okt 2014, 13​:04​:58, peschwa@​gmail.com schrieb​:

Am Mo 30. Jan 2012, 06​:11​:05, coke schrieb​:

On Wed Mar 24 07​:00​:23 2010, masak wrote​:

$ perl -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH HAI
OH BAI BAI

$ perl6 -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH BAI BAI

So Perl 6 doesn't behave like Perl 5 (and sed and lots of other
programs accepting the -e option). S19​:427 even says that chaining
-e
options together should work.

Behavior has changed​: rakudo is now running the first -e, not the
last​:

$ ./perl6 -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH HAI

A PR for this issue exists at [0]. Tests have not yet been added to
roast, at least not by me.

[0] Raku/nqp#190

I have found the tests in S19-command-line-options/01-multiple-e.t and they don't pass. The PR is thus not yet ready to be merged.

@p6rt
Copy link
Author

p6rt commented Nov 19, 2014

From @usev6

Recently there was a change in the S19-commandline design document (Raku/old-design-docs@8f8c84034c) and now -e <program> stops option processing.

So the following is now expected behaviour

$ perl6 -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH HAI

$ perl6 -e 'say @​*ARGS' -e 'print "OH BAI BAI\n"'
-e print "OH BAI BAI\n"

Since there is a passing test for -e working as a stopper in S19-command-line/dash-e.t I'm closing this ticket now. In case I overlooked something and there is still an issue, please reopen the ticket.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Nov 19, 2014

From @usev6

Recently there was a change in the S19-commandline design document (Raku/old-design-docs@8f8c84034c) and now -e <program> stops option processing.

So the following is now expected behaviour

$ perl6 -e 'print "OH HAI\n";' -e 'print "OH BAI BAI\n"'
OH HAI

$ perl6 -e 'say @​*ARGS' -e 'print "OH BAI BAI\n"'
-e print "OH BAI BAI\n"

Since there is a passing test for -e working as a stopper in S19-command-line/dash-e.t I'm closing this ticket now. In case I overlooked something and there is still an issue, please reopen the ticket.

@p6rt p6rt closed this as completed Nov 19, 2014
@p6rt
Copy link
Author

p6rt commented Nov 19, 2014

@usev6 - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant