in reply to Weird object happening
The 'makeImage' subroutine is acting like a function, and not a method.
I find it easiest to understand the difference between a function and a method by looking at it in the way that perl actually handles them.
# function call grizzly::makeImage(); # class method call grizzly->makeImage(); # Which perl translates to grizzly::makeImage('grizzly'); # object method call $nub->makeImage(); # which perl translates to grizzly::makeImage($nub);
So unless 'makeImage' is expecting the classname or the object itself as the first parameter, it will only work as a function. I would recommend that you read the perltoot docs that come with perl. It will give you much better insight into how objects work in perl that I can in this post.
|
|---|