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

behavior when passing garbage with -M command line option (perl6 -M $'\0') #5227

Open
p6rt opened this issue Apr 9, 2016 · 4 comments
Open
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Apr 9, 2016

Migrated from rt.perl.org#127867 (status was 'open')

Searchable as RT127867$

@p6rt
Copy link
Author

p6rt commented Apr 9, 2016

From @AlexDaniel

Let's pass null byte!

Command​:
perl6 -M $'\0' -e 'say 42'

Result​:
===SORRY!===
Cannot iterate object with P6opaque representation

Let's pass backspace!

Command​:
perl6 -M $'\b\b\b\b' -e 'say 42'

Result​:
===SORRY!===
Could not f in​:
  /home/alex/.perl6/2015.12-344-gbc4c6df
  /home/alex/.rakudobrew/moar-nom/install/share/perl6/site
  /home/alex/.rakudobrew/moar-nom/install/share/perl6/vendor
  /home/alex/.rakudobrew/moar-nom/install/share/perl6
  CompUnit​::Repository​::AbsolutePath<-157280344>
  CompUnit​::Repository​::NQP<-157281880>
  CompUnit​::Repository​::Perl5<-157283320>

(Notice “Could not f in​:”)

Let's pass newlines!

Command​:
perl6 -M $'\n\n\n\n' -e 'say 42'

Result​:
===SORRY!===
Could not find

in​:
  /home/alex/.perl6/2015.12-344-gbc4c6df
  /home/alex/.rakudobrew/moar-nom/install/share/perl6/site
  /home/alex/.rakudobrew/moar-nom/install/share/perl6/vendor
  /home/alex/.rakudobrew/moar-nom/install/share/perl6
  CompUnit​::Repository​::AbsolutePath<-156760152>
  CompUnit​::Repository​::NQP<-156761688>
  CompUnit​::Repository​::Perl5<-156763128>

What the hell am I doing? Dunno, but it could handle these things more gracefully.

@p6rt
Copy link
Author

p6rt commented Apr 9, 2016

@p6rt
Copy link
Author

p6rt commented Apr 16, 2016

From @zoffixznet

This actually affects pretty much all exceptions that use variables​:

  $ perl6 -e ' ."\b\b\b\b\b\bth is bad for yo"()'
  Meth is bad for yo' not found for invocant of class 'Any'
  in block <unit> at -e line 1

Should we quote them all or leave this?

@p6rt
Copy link
Author

p6rt commented Apr 16, 2016

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

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant