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

EXPORT sub errors do not show line number #5395

Open
p6rt opened this issue Jun 22, 2016 · 1 comment
Open

EXPORT sub errors do not show line number #5395

p6rt opened this issue Jun 22, 2016 · 1 comment
Labels
LTA

Comments

@p6rt
Copy link

@p6rt p6rt commented Jun 22, 2016

Migrated from rt.perl.org#128461 (status was 'new')

Searchable as RT128461$

@p6rt
Copy link
Author

@p6rt p6rt commented Jun 22, 2016

From @zoffixznet

In the examples below, no location of the error is printed. The bigger the app, the harder this error would be to track down.

Even when `die`ing inside the EXPORT sub, no line number is shown.

zoffix@​leliana​:/tmp/tmp.9PVg6XdMEY$ cat Foo.pm6
sub EXPORT ($) {}
zoffix@​leliana​:/tmp/tmp.9PVg6XdMEY$ perl6 -I. -e 'use Foo'
===SORRY!===
Too few positionals passed; expected 1 argument but got 0
zoffix@​leliana​:/tmp/tmp.9PVg6XdMEY$ pico Foo.pm6
zoffix@​leliana​:/tmp/tmp.9PVg6XdMEY$ cat Foo.pm6
sub EXPORT ($a = '') {$a or die "Bad arg"}
zoffix@​leliana​:/tmp/tmp.9PVg6XdMEY$ perl6 -I. -e 'use Foo'
===SORRY!===
Bad arg
zoffix@​leliana​:/tmp/tmp.9PVg6XdMEY$

@p6rt p6rt added the LTA label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA
Projects
None yet
Development

No branches or pull requests

1 participant