Ticket #1207 (closed deprecation: fixed)
Non-existent lexical throws exception
Reported by: | pmichaud | Owned by: | Paul C. Anagnostopoulos |
---|---|---|---|
Priority: | normal | Milestone: | 2.5 |
Component: | core | Version: | 1.7.0 |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | applied | Platform: |
Description
If we use the find_lex opcode on a symbol that hasn't been defined in any outer scope, it generates an exception with
Lexical '$foo' not found
For consistency with the other "symbol lookup" ops such as get_global and hash lookups, the find_lex opcode should probably return PMCNULL if the given symbol is not found.
Or, the find_lex opcode could throw an exception only when PARROT_ERRORS_GLOBALS_FLAG (or a similar flag) is set. But the default behavior should probably match the behavior of the other symbol lookup ops.
Thanks!
Pm
This was originally tracked at http://rt.perl.org/rt3/Ticket/Display.html?id=47894
Attachments
Change History
Note: See
TracTickets for help on using
tickets.