in reply to Calling method inside and outside of package
In the first case you would call the function as kcott mentioned, so as
If you call the function from inside the package, you cannot access the data contained in the object, because you are passing an empty string instead of an object to the function.$obj -> xxx("hi");
If you have a simple function (say, for adding two numbers), you can write a function like you normally would, so without getting the class name from the arguments.
And never call a routine or program test --- there is probably another function or program with that name, which will take you a few hours to find out.
|
|---|