Whoa! That's a lot of code to examine, to help you find your problem. Can you trim it down a little? :)
At a guess, I would say that the error you are getting has to do with the fact that the $self->{-finish} value is not defined, and you are trying to evaluate it. Maybe check for its existence instead?
No good deed goes unpunished. -- (attributed to) Oscar Wilde