in reply to Bug in Array::Compare? (no, really)

If you change
my ($pkg, $caller) = (caller(1))[0, 3]; my $perm = $caller eq __PACKAGE__ . "::perm";
to
my ($pkg, $caller) = (caller(1))[0, 3]; $caller = '' unless $caller; my $perm = $caller eq __PACKAGE__ . "::perm";
your problem is solved.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: Bug in Array::Compare? (no, really)
by Anonymous Monk on Apr 19, 2009 at 17:05 UTC
    or $caller //= ''; in 5.10! (or just complain to the maintainer)
      or $caller //= ''; in 5.10!
      That is really a terrible idea! It would turn the warning (which is only mildly annoying) to a real error in all pre-5.10 systems and thus break all programs using it.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James