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

Cannot change input-line-separator #3693

Closed
p6rt opened this issue Feb 20, 2015 · 8 comments
Closed

Cannot change input-line-separator #3693

p6rt opened this issue Feb 20, 2015 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Feb 20, 2015

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

Searchable as RT123888$

@p6rt
Copy link
Author

p6rt commented Feb 20, 2015

From @Tux

$ echo -n "A+B+C+D+" >xx.txt
$ perl -wE'$/="+";say while<>' xx.txt
A+
B+
C+
D+
$ perl6 -e 'use v6;$*IN.input-line-separator="+";.say for lines()​:eager' xx.txt
A+B+C+D+

--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.21 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/

@p6rt
Copy link
Author

p6rt commented Mar 9, 2015

From @Mouq

On Thu Feb 19 23​:22​:42 2015, hmbrand wrote​:

$ echo -n "A+B+C+D+" >xx.txt
$ perl -wE'$/="+";say while<>' xx.txt
A+
B+
C+
D+
$ perl6 -e 'use v6;$*IN.input-line-separator="+";.say for
lines()​:eager' xx.txt
A+B+C+D+

Output on most recent Moar build​:

$ echo "A+B+C+" | perl6 -e 'use v6;$*IN.input-line-separator="+";.say for lines()​:eager'
A+
B+
C+

A test was added in Roast commit​:

commit 0cc81eb5c18283dd3c365bd26609be0dd05c6105
Author​: Mouq <alexmoquin@​gmail.com>
Date​: Sun Mar 8 20​:47​:52 2015 -0400

  Add test for RT #​123888

@p6rt
Copy link
Author

p6rt commented Mar 9, 2015

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

@p6rt
Copy link
Author

p6rt commented Mar 9, 2015

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

@p6rt
Copy link
Author

p6rt commented Mar 9, 2015

From @Mouq

On Sun Mar 08 17​:53​:18 2015, Mouq wrote​:

On Thu Feb 19 23​:22​:42 2015, hmbrand wrote​:

$ echo -n "A+B+C+D+" >xx.txt
$ perl -wE'$/="+";say while<>' xx.txt
A+
B+
C+
D+
$ perl6 -e 'use v6;$*IN.input-line-separator="+";.say for
lines()​:eager' xx.txt
A+B+C+D+

Output on most recent Moar build​:

$ echo "A+B+C+" | perl6 -e 'use v6;$*IN.input-line-separator="+";.say
for lines()​:eager'
A+
B+
C+

A test was added in Roast commit​:

commit 0cc81eb5c18283dd3c365bd26609be0dd05c6105
Author​: Mouq <alexmoquin@​gmail.com>
Date​: Sun Mar 8 20​:47​:52 2015 -0400

Add test for RT #​123888

Oops, this ticket is not actually closed. From IRC​:

07​:01 < [Tux]> .tell Mouq https://gist.github.com/Tux/3efcf2bbcb859a27ef6a <= RT#​123888 is incomplete. reopen?
07​:02 < [Tux]> note that there is no newline *at all* in my example, incontrast to the example that shows the current fix

So the problem was actually not solved, and has to do with invoking perl6 with a file supplied to @​*ARGS. In zsh​:

$ perl6 -e 'use Test; $*IN.input-line-separator="+"; is +lines(), 3' =(echo "A+B+C+")
not ok 1 -

# Failed test at -e line 1
# expected​: '3'
# got​: '1'

(where =(…) is just zsh syntax to make a tmpfile with the command and give back the tmpfile's name)

@p6rt
Copy link
Author

p6rt commented Mar 9, 2015

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

@p6rt
Copy link
Author

p6rt commented Nov 5, 2015

From @jnthn

On Mon Mar 09 00​:51​:53 2015, Mouq wrote​:

On Sun Mar 08 17​:53​:18 2015, Mouq wrote​:

On Thu Feb 19 23​:22​:42 2015, hmbrand wrote​:

$ echo -n "A+B+C+D+" >xx.txt
$ perl -wE'$/="+";say while<>' xx.txt
A+
B+
C+
D+
$ perl6 -e 'use v6;$*IN.input-line-separator="+";.say for
lines()​:eager' xx.txt
A+B+C+D+

Output on most recent Moar build​:

$ echo "A+B+C+" | perl6 -e 'use v6;$*IN.input-line-separator="+";.say
for lines()​:eager'
A+
B+
C+

A test was added in Roast commit​:

commit 0cc81eb5c18283dd3c365bd26609be0dd05c6105
Author​: Mouq <alexmoquin@​gmail.com>
Date​: Sun Mar 8 20​:47​:52 2015 -0400

Add test for RT #​123888

Oops, this ticket is not actually closed. From IRC​:

07​:01 < [Tux]> .tell Mouq
https://gist.github.com/Tux/3efcf2bbcb859a27ef6a <= RT#​123888 is
incomplete. reopen?
07​:02 < [Tux]> note that there is no newline *at all* in my example,
incontrast to the example that shows the current fix

So the problem was actually not solved, and has to do with invoking
perl6 with a file supplied to @​*ARGS. In zsh​:

$ perl6 -e 'use Test; $*IN.input-line-separator="+"; is +lines(), 3'
=(echo "A+B+C+")
not ok 1 -

# Failed test at -e line 1
# expected​: '3'
# got​: '1'

(where =(…) is just zsh syntax to make a tmpfile with the command and
give back the tmpfile's name)

Fixed now with various recent separator related improvements, and test added in S16-filehandles/argfiles.t.

/jnthn

@p6rt p6rt closed this as completed Nov 5, 2015
@p6rt
Copy link
Author

p6rt commented Nov 5, 2015

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

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

No branches or pull requests

1 participant