Turn off strict vars when writing a one-liner #63

schwern opened this Issue Jul 24, 2009 · 4 comments


None yet

3 participants

schwern commented Jul 24, 2009

Writing one liners with perl5i is a little annoying because it wants me to predeclare all my variables. Strict is on. I think that's a little silly. If $0 is -e turn strict vars off. Leave the rest on.

exodist commented May 11, 2010

The Devel-Delcare workaround in my master turns -e into a real program. We could add 'no strict' to the top of the generated script file solving this problem.

doherty commented Apr 23, 2011

I think you probably want strict vars disabled for perl -Mperl5i::2 -e '$fun="yay"; say $fun;' too

@doherty doherty added a commit to doherty/perl5i that referenced this issue Apr 23, 2011
@doherty doherty No strict vars for one-liners
This disables strict vars for one-liners using the perl5i
executable, or when perl5i is loaded manually:
    perl -Mperl5i::latest -e '$fun="yay"; say $fun;'

Fixes #63
schwern commented Apr 28, 2011

Fixed by #194

@schwern schwern closed this Apr 28, 2011
doherty commented Apr 28, 2011

I just couldn't read that list. But that used to be two commits, I'm not sure what I did to squash them :\

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