The "$a, $b, $c" portion of the hash uses scalars being passed in to the derivative function in @quartic. If you copy the loop counters like
my $a_copy = $a and use those in @quartic, you may be able to bypass the scalar leak. I would say the module has some issues, but it looks like you can bypass them.