in reply to XML::RSS save crashing
It looks like someone (you?) is sensibly using use strictures; or use warnings FATAL => 'all'; somewhere.
Where is $text coming from? My gut reaction is that you are unexpectedly assigning a value of undef to it somewhere, possibly thinking you have an empty string instead. If you are in fact making the assignment in your code you might try this: my $text = $some_str || ''; to ensure a defined value if an empty string is acceptable.
If it is not, then you need to find out why the data is coming in as undef to begin with.
Thinking about it further, I suspect you are passing $some_str as a parameter to a method. You could still use the $some_str || '' construct, but it feels more like you should track down why that is undef to begin with.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML::RSS save crashing
by afoken (Chancellor) on May 11, 2015 at 09:46 UTC |