$class_or_object here can be a real object (an instance of a a class) or a class name (IOW, a string containing the package name designating the class), or a class name as a bare word.$class_or_object->method(other arguments);
Note the -> arrow. That means that the function is going to be looked up and called as a method. If you call the function directly, as in MyPackage::some_method() the call will not behave as a method but just like a plain function call. In other words; perl distinguishes between methods and functions only by the way they are called.
To answer your question directly: feat->mymethod() should work.
Note that more-or-less officially, all-lowercase module/package names are reserved for pragmas, which are very uncommon outside the base distribution, so while nothing aside from a potential clash with an existing pragma will stop you from using all-lowercase names, it's generally frowned upon. It also makes it harder to spot class names.
In reply to Re: package & class problem
by Joost
in thread package & class problem
by isha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |