Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^9: Can't decompress zlib compression stream with Compress:Zlib

by BrowserUk (Patriarch)
on Oct 04, 2016 at 19:29 UTC ( [id://1173277]=note: print w/replies, xml ) Need Help??


in reply to Re^8: Can't decompress zlib compression stream with Compress:Zlib
in thread Can't decompress zlib compression stream with Compress:Zlib

Take a look at the embedded package in the OP code.

I'm saying that coded this way:

#! perl -sl use strict; use warnings; X::test(); { package X; $FRED = 'fred'; sub test { print 'This is package:', __PACKAGE__; } 1; }

The strict & warnings affect that embedded package:

C:\test>perl -c test.pl Global symbol "$FRED" requires explicit package name at test.pl line 1 +0. test.pl had compilation errors.

But coded this way:

#! perl -sl { package X; $FRED = 'fred'; sub test { print 'This is package:', __PACKAGE__; } 1; } use strict; use warnings; X::test();

They do not:

C:\test>perl -c test.pl test.pl syntax OK

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1173277]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-24 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found