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
Wrong error message for default outside a topicalizer #11377
Comments
From @sciuriusCreated by @sciurius #!/usr/bin/perl prints "Hello!" and then aborts with: Can't use when() outside a topicalizer at ... Perl Info
|
From @jkeenanOn Tue May 24 05:37:20 2011, jv wrote:
What would be a better message -- and how should it be classified (W) A warning (optional). Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Wed Dec 14 17:57:27 2011, jkeenan wrote:
Can't use default outside a topicalizer...?
(F)
-- Father Chrysostomos |
From @sciurius[Quoting Father Chrysostomos via RT, on December 14 2011, 18:08, in "[perl #91514] Wrong "]
Can't use default{} outside a topicalizer...?
Yes. -- Johan |
From @ap* Johan Vromans <jvromans@squirrel.nl> [2011-12-15 08:00]:
$ perl -econtinue I think the errors for `when` and `default` should follow that style: Can't "when" outside a topicalizer at ... Regards, |
From @sciurius[Quoting A. Pagaltzis via RT, on December 15 2011, 21:09, in "Re: [perl #91514] Wr"]
Oh yes, I can: perl -e "for(1){}continue{}"
+1 -- Johan |
From @apHi Johan, * Johan Vromans <jvromans@squirrel.nl> [2011-12-16 08:35]:
That’s different, it’s a `continue` block. The runtime error message is The error for putting that one in the wrong context is very different: $ perl -e'continue{}' I find it annoying personally that `when` and `default` are dynamically (I find it difficult to constrain myself to the point at hand when Regards, |
From @sciurius[Quoting A. Pagaltzis via RT, on December 16 2011, 02:47, in "Re: [perl #91514] Wr"]
Yes, I recognise this... -- Johan |
From @cpansproutOn Thu Dec 15 23:32:28 2011, jv wrote:
Done with commit fc7debf. -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
From perl-diddler@tlinx.orgJames E Keenan via RT wrote:
Has anyone considered that 'topicalizer' is complete jargon rubish? Try using *concrete* terms in a error messages, like Can't use when outside ARRRGGG!!! How about we just cut to the end of this trend and start printing things |
From @ikegamiOn Mon, Dec 19, 2011 at 8:37 PM, Linda Walsh <perl-diddler@tlinx.org> wrote:
given, for, map and grep ...except not the last two. $ perldoc perlsyn | grep -i topical || echo 'not found' |
From @b2gillsOn Mon, Dec 19, 2011 at 7:55 PM, Eric Brine <ikegami@adaelis.com> wrote:
Well this is screwy: $> perl -E'say grep { when("a"){} } "a".."d"' $> perl -E'say grep { when("b"){} } "a".."d"' $> perl -E'say grep { when("c"){} } "a".."d"' $> perl -E'say grep { when("d"){} } "a".."d"' $> perl -E'say grep { when("d"){}; 1 } "a".."d"' $> perl -E'say grep { when("a"){...} } "a".."d"' $> perl -E'say grep { when("c"){...} } "a".."d"' $> perl -E'say grep { when("d"){}; say } "a".."d"' $> perl -E'say grep { when("e"){}; say } "a".."d"' It doesn't matter what is inside of the `when` block. |
From @cpansproutOn Mon Dec 19 18:30:16 2011, b2gills@gmail.com wrote:
Could you open a new ticket? -- Father Chrysostomos |
From [Unknown Contact. See original ticket]On Mon Dec 19 18:30:16 2011, b2gills@gmail.com wrote:
Could you open a new ticket? -- Father Chrysostomos |
Migrated from rt.perl.org#91514 (status was 'resolved')
Searchable as RT91514$
The text was updated successfully, but these errors were encountered: