in reply to parameter passing problem
G'day gokhan,
Welcome to the monastery.
You've written both test_filelist_format() and test_format() as instance methods. If that's what they're supposed to be, you should invoke them like this:
$object->method(@args)
If they're supposed to be just normal subroutines, you'd call them like this:
function(@args)
and you should remove this line:
my $obj = shift;
You haven't shown sufficient code for me to advise which way around these should be: I see no use of $obj in either but you've omitted code from both so maybe $obj is used where you've shown "...". Regardless, that should be enough information for you to fix your current problem. I'd recommend you look in other parts of your code for similar issues.
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: parameter passing problem
by gokhan (Initiate) on Jul 03, 2013 at 09:20 UTC | |
|
Re^2: parameter passing problem
by gokhan (Initiate) on Jul 03, 2013 at 12:55 UTC | |
by toolic (Bishop) on Jul 03, 2013 at 12:58 UTC | |
|
Re^2: parameter passing problem
by gokhan (Initiate) on Jul 03, 2013 at 13:03 UTC |