in reply to calling sub with object as param
Welcome to the Monastery!
You're creating an object prior to the sub call with a hash reference parameter, which has a key named attribute.
In the Operations package, you're trying to call attribute as a method (subroutine), but that's not what attribute is.
Change this:
$preparedStatement->execute($inputData->attribute)
...to this (note the curly braces around attribute, which denotes it as a hash reference key):
$preparedStatement->execute($inputData->{attribute})
and see if that helps get you where you want to be.
-stevieb
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: calling sub with object as param
by Anonymous Monk on Sep 01, 2015 at 22:39 UTC | |
by perlnewb4life (Initiate) on Sep 02, 2015 at 10:40 UTC | |
by Athanasius (Archbishop) on Sep 03, 2015 at 06:47 UTC | |
by afoken (Chancellor) on Sep 03, 2015 at 19:27 UTC |