Closed p5pRT closed 21 years ago
The code below executes with no errors or warnings; output is '1bad'.
use strict; use warnings; print 1..1\, bad;
I'm using Windows 2000 5.00.2195\, Service Pack 2.
(apologies for any formatting errors. perlbug didn't seem to send mail\, so I pasted into my mail client.)
On Fri\, Dec 06\, 2002 at 10:39:49PM -0000\, David Wall wrote:
The code below executes with no errors or warnings; output is '1bad'.
use strict; use warnings; print 1\.\.1\, bad;
This has been fixed in 5.8.0.
$ perl5.8.0 -w use strict; use warnings; print 1..1\, bad; Bareword "bad" not allowed while "strict subs" in use at - line 3. Execution of - aborted due to compilation errors.
--
Michael G. Schwern \schwern@​pobox\.com http://www.pobox.com/~schwern/ Perl Quality Assurance \perl\-qa@​perl\.org Kwalitee Is Job One I need a SHOWER a BURGER and some ROBOTS\, STAT! -- http://www.angryflower.com/allrigh.gif
@rspier - Status changed from 'new' to 'resolved'
On Fri\, Dec 06\, 2002 at 08:19:52PM -0800\, Michael G Schwern wrote:
On Fri\, Dec 06\, 2002 at 10:39:49PM -0000\, David Wall wrote:
The code below executes with no errors or warnings; output is '1bad'.
use strict; use warnings; print 1\.\.1\, bad;
This has been fixed in 5.8.0.
And it turns out wasn't broken in 5.005:
nick@Bagpuss [nick]$ perl5.00503 -w use strict; print 1..1\, bad; Bareword "bad" not allowed while "strict subs" in use at - line 2. Unquoted string "bad" may clash with future reserved word at - line 2. Execution of - aborted due to compilation errors.
But I wasn't aware of any of this until just now. Thanks for the report.
Nicholas Clark -- INTERCAL better than perl? http://www.perl.org/advocacy/spoofathon/
On Sat\, 7 Dec 2002 14:24:20 +0000\, Nicholas Clark \nick@​unfortu\.net said:
> And it turns out wasn't broken in 5.005:
> nick@Bagpuss [nick]$ perl5.00503 -w > use strict; > print 1..1\, bad; > Bareword "bad" not allowed while "strict subs" in use at - line 2. > Unquoted string "bad" may clash with future reserved word at - line 2. > Execution of - aborted due to compilation errors.
> But I wasn't aware of any of this until just now. Thanks for the report.
Indeed thanks! Blame analysis follows:
----Program---- use strict; print 1..1\, bad;
----Output of /usr/local/perl-5.005_61@4759/bin/perl---- Bareword "bad" not allowed while "strict subs" in use at tests/bareword_bad.pl line 2. Execution of tests/bareword_bad.pl aborted due to compilation errors.
----EOF ($?='65280')---- ----Output of /usr/local/perl-5.005_61@4760/bin/perl---- 1bad ----EOF ($?='0')---- ----Output of /usr/local/perl-5.7.1@11414/bin/perl---- 1bad ----EOF ($?='0')---- ----Output of /usr/local/perl-5.7.1@11415/bin/perl---- Bareword "bad" not allowed while "strict subs" in use at tests/bareword_bad.pl line 2. Execution of tests/bareword_bad.pl aborted due to compilation errors.
----EOF ($?='65280')----
-- andreas
Op een mooie herfstdag (Saturday 07 December 2002 05:19)\, schreef Michael G Schwern:
On Fri\, Dec 06\, 2002 at 10:39:49PM -0000\, David Wall wrote:
The code below executes with no errors or warnings; output is '1bad'.
use strict; use warnings; print 1\.\.1\, bad;
This has been fixed in 5.8.0.
$ perl5.8.0 -w use strict; use warnings; print 1..1\, bad; Bareword "bad" not allowed while "strict subs" in use at - line 3. Execution of - aborted due to compilation errors.
Shouldn't we add this case to t/lib/strict/subs?
Good luck,
Abe -- [ About the taint pragma proposal ] "Mommy\, mommy\, look! I'm driving my bicycle without my hands!" .... "Mommah\, mommah\, mook! I'm mrivin my micicl mimof my meemh!"" -- Jarkko Hietaniemi on p5p @ 2001-12-13
Abe Timmerman wrote:
Shouldn't we add this case to t/lib/strict/subs?
Yes\, we should. Thanks\, applied as #18265.
--- t/lib/strict/subs.orig Sun Dec 8 16:53:58 2002 +++ t/lib/strict/subs Sun Dec 8 16:59:20 2002 @@ -354\,3 +354\,11 @@ EXPECT Bareword "BAREWORD" not allowed while "strict subs" in use at - line 5. Execution of - aborted due to compilation errors. +######## + +# Ticket: 18927 +use strict 'subs'; +print 1..1\, bad; +EXPECT +Bareword "bad" not allowed while "strict subs" in use at - line 4. +Execution of - aborted due to compilation errors.
@cwest - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#18927 (status was 'resolved')
Searchable as RT18927$