in reply to how to localise a problem?
I suggest you create Unit Test scripts using Test::More. You could create different scenarios and test the functions from your modules.
The error "Argument list too long" sounds like you pass too many arguments to a function. Have you tried a grep to find where this exact error message comes from? Maybe it comes from one of the CPAN modules you are using!
If you find the source of the message, then look in your code where you call that function and put some extra validation around it.
Testing never proves the absence of faults, it only shows their presence.