No line 1434 can't be the troublemaker because with or without warnings, undef ne 'commit'. The result of this boolean test would be false, and nothing would be printed. And as you can see, there is printout from this block:
I've got my sources!
I'm committed!
To the op: use Data::Dumper, and print out what's in the dubious variables (here: $arg). If this sub is called a lot without any warnings, then it's better to restrict output to when it is actually useful. For that, I sometimes do things like:
use Data::Dumper;
local $SIG{__WARN__} = sub { print STDERR @_, Dumper $arg };
You must put that where $arg is in scope, thus in the sub, and it needs to be run before the warning happens.
Also, print out the line number perl thinks it's on, it's in __LINE__. Sometimes it's off from the actual line number by 1, maybe sometimes even more (though I don't think I've ever seen that happen). | [reply] [d/l] [select] |
The line numbering seems to drift when your statement itself is more than one line, or on occasion when the if call is labelled the culprit, when it's actually a line of code in the if-BLOCK. So, it seems that 1431 is the problem, not 1430, and yet, no output is produced to support of that theory.
| [reply] [d/l] [select] |