@{$self->request_rate($from, $to, $packages, $args)} is the array ref your error message is referring to. So that means the call to $self->request_rate failed. But that error message is still not very informative. I would run it through the perl debugger (perl -d script) just hit 'c' and you'll see the entire error stack.