in reply to Can't call method "otherwise" without a package or object reference at
$ perl -e'$x="1"; $x->otherwise' Can't call method "otherwise" without a package or object reference at + -e line 1.
You don't appear to show any method calls to otherwise, unless something ends up being treated as an indirect method call.
$ perl -e'$x="1"; otherwise $x' Can't call method "otherwise" without a package or object reference at + -e line 1.
That would indicate otherwise isn't found as a sub.
$ perl -le'sub otherwise { print "foo" } $x="1"; otherwise $x' foo
Make sure you properly imported otherwise from whatever module provides it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't call method "otherwise" without a package or object reference at
by rpelak (Sexton) on Oct 06, 2010 at 00:19 UTC | |
by ikegami (Patriarch) on Oct 06, 2010 at 02:25 UTC | |
by rpelak (Sexton) on Oct 06, 2010 at 05:05 UTC | |
by ig (Vicar) on Oct 06, 2010 at 07:17 UTC | |
by rpelak (Sexton) on Oct 06, 2010 at 15:25 UTC | |
|