nayakgi / perl-compiler

Automatically exported from code.google.com/p/perl-compiler
Other
0 stars 0 forks source link

format STDOUT and STDERR not stored #285

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
try to compile and run that script
> cat script
format STDERR =
.
    print "ok\n" if ref(*STDERR{FORMAT}) eq "FORMAT";

What is the expected output? 

can also be reproduced using that one liner
> perl -e 'BEGIN { eval qq{format STDERR =\n.} } print "ok\n" if 
ref(*STDERR{FORMAT}) eq "FORMAT";'
ok

What do you see instead?

> perlcc -r -e 'BEGIN { eval qq{format STDERR =\n.} } print "ok\n" if 
ref(*STDERR{FORMAT}) eq "FORMAT";'

Please use labels and text to provide additional information.

Original issue reported on code.google.com by nicolas....@gmail.com on 30 Jan 2014 at 10:25

GoogleCodeExporter commented 9 years ago

Original comment by todd.e.rinaldo on 31 Jan 2014 at 12:38

GoogleCodeExporter commented 9 years ago
This is related to the magic names STDOUT and STDERR, which do not yet store 
the attached format.

perlcc -r -e 'BEGIN { eval qq{format STD =\n.} } print "ok\n" if 
ref(*STD{FORMAT}) eq "FORMAT";'
works fine

Original comment by reini.urban on 31 Jan 2014 at 6:26

GoogleCodeExporter commented 9 years ago
Issue 286 has been merged into this issue.

Original comment by reini.urban on 31 Jan 2014 at 6:26

GoogleCodeExporter commented 9 years ago
Merged all format testcases into t/issue238.t

Fixed in 1.43_05 with commit ee98e2245a489a241315056ffb3e01e7eb697ae6
Author: Reini Urban <rurban@cpanel.net>
Date:   Fri Jan 31 12:50:11 2014 -0600

    1.43_05: fix format STDOUT/STDERR

    added all format testcases to t/issue238.t

Original comment by reini.urban on 31 Jan 2014 at 7:03

GoogleCodeExporter commented 9 years ago
Not fixed and I have ee98e2245a489a241315056ffb3e01e7eb697ae6 in my history.

Original comment by todd.e.rinaldo on 31 Jan 2014 at 11:24

GoogleCodeExporter commented 9 years ago
What testcase is broken exactly? 

I added all known failures to t/issue238 and they all pass.
#277,#284,#283,#239,#285,#238

format STDOUT and STDERR are now stored correctly

Original comment by reini.urban on 1 Feb 2014 at 6:37

GoogleCodeExporter commented 9 years ago
note fixed with ee98e2245a489a241315056ffb3e01e7eb697ae6

> perlcc -r -e 'BEGIN { eval qq{format STDERR =\n.} } print "ok\n" if 
ref(*STDERR{FORMAT}) eq "FORMAT";'
> perlcc -O3 -r -e 'BEGIN { eval qq{format STDERR =\n.} } print "ok\n" if 
ref(*STDERR{FORMAT}) eq "FORMAT";'

Original comment by nicolas....@gmail.com on 6 Feb 2014 at 8:23

GoogleCodeExporter commented 9 years ago

Original comment by reini.urban on 11 Jun 2014 at 11:20

GoogleCodeExporter commented 9 years ago

Original comment by reini.urban on 11 Jun 2014 at 11:24