in reply to Re: Can't call method "otherwise" without a package or object reference at
in thread Can't call method "otherwise" without a package or object reference at
And the other try / catch blocks work in the same sub, so the stuff is defined. It has to be something about this particular use of it... like a simple syntax error (I checked for the semi-colon on the end) or the a unique exception coming from inside, but I thought the otherwise should handle any exception type...package err; use da qw(/.*/); use dbg qw(/.*/); use base qw(Error); use overload ('""' => 'stringify'); sub new { prtDbgSubInfo(); my ($pkg,$text) = @_; my @args = (); local $Error::Depth = $Error::Depth + 1; local $Error::Debug = 1; # Enables storing of stacktrace my ($this) = $pkg->SUPER::new(-text => $text, @args); my ($stack) = $this->stacktrace; $stack =~ s#$text #$text\n\t#; #adds a newline after the text and before the first at ... my ($preMsg) = "\n--Error--"; $this->{-text} = "$preMsg\n$stack"; return($this); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Can't call method "otherwise" without a package or object reference at
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 | |
by ikegami (Patriarch) on Oct 06, 2010 at 16:14 UTC | |
|