This is one of Perl's stranger messages, but it is a common one. I assume one of the following is true
- You are requireing this code from within the body of a subroutine in your main code
- You are running it with mod_perl under Apache::Registry
The result is that you are declaring a nested subroutine within another one, and the inner sub accesses a lexical variable declared in the outer one. This is a bad thing, because Perl will not be able to figure out which "instance" of that lexical variable the inner sub should be working with when you call it. Solutions to this problem are explained
here.