sub error_excerpt{ return defined($error_excerpt)?$self->{_error_excerpt}:"No Error Excer +pt."; }
...what the A.M. said. In particular, where do $self and $error_excerpt come from? For example, did you just leave out the my $self = shift; at the beginning of the routine in this sample code only, or is it also missing from the real code?
In case $error_excerpt is not available in the scope of the routine, you'd always get "No Error Excerpt.". This would be the case if $error_excerpt is defined as a lexical variable in another routine. In this case, an empty package variable of the same name would (silently) be used instead — unless you enable strictures...
Always use strict; use warnings; — it would likely have warned you of these types of errors.
In reply to Re: Question on XML output using Perl
by almut
in thread Question on XML output using Perl
by siddheshsawant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |