it looks like the graph method, (though not shown) is converting the calling parameters into a hash. And that's what you start off expecting when suddenly you put @draw at the end of the call parameters, which has three elements (forcing total odd). You need to exchange @draw for something like some_key => \@draw I would imagine.