General fatal errors#
Runtime dies that are neither regex-compilation nor compile-time syntax errors: method resolution, inheritance, subroutine calls, attributes, and module-level usage errors. All are fatal (F) and trappable with eval or try.
Subroutine calls#
`Undefined subroutine &%s called`#
(F) A call named a subroutine that does not exist at call time. The fully-qualified name is shown. Causes: a typo in the name, a missing use of the module that defines it, or calling before the sub is declared in a context where that matters. The runtime form `Undefined subroutine &NAME called at FILE line N.` adds the call site.
Method resolution and inheritance#
`Can't use anonymous symbol table for method lookup`#
(F) Method dispatch reached a package with no named symbol table (an anonymous stash). A blessed reference must point into a real, named package for method calls to resolve.
`Recursive inheritance detected in package '%s'`#
(F) A class’s @ISA chain leads back to itself - a cycle. Method resolution cannot proceed. Break the loop in the inheritance graph.
`Inconsistent hierarchy during C3 merge of class '%s'`#
(F) Under the C3 method-resolution order, the linearization of this class’s parents has no consistent ordering. Two parents disagree on the order of a shared ancestor. Restructure the inheritance so the parent orderings are compatible, or switch the class back to the default depth-first MRO.
`Invalid mro name: '%s'`#
(F) A use mro '...' named an order that does not exist. The two valid names are `dfs` (the default depth-first order) and `c3`.
Attributes#
`Unterminated attribute parameter in attribute list`#
(F) An attribute with a parenthesized parameter - :Foo(bar - was not closed. Balance the parentheses in the attribute list.
Module usage errors#
These come from native modules when called incorrectly. They are fatal because the call cannot proceed.
`Usage: POSIX::sprintf(pattern, args...)`#
(F) A POSIX function was called with the wrong arguments. The message names the correct calling form.
`IO::Socket::%s`#
(F) An IO::Socket operation failed; the message names the specific call.
See also#
@ISA- the inheritance array whose contents the MRO errors are about.mro- selecting and inspecting the method-resolution order.bless- associates a reference with the package whose methods the anonymous-symbol-table error is about.Value and type errors - “Not a subroutine reference” and the other what-kind-of-value diagnostics.