Are you sure all needed modules are installed and were installed without errors?

The "push_write" method is defined in the AnyEvent::Handle module. I have not looked at each of the modules you are loading to see which one, if any, load that module, but start by adding it to your list of use statements.

You should also add the warnings and strict pragmas, which should be in every script you write.