in reply to
Re^4: Module provides both of functional interface and object-oriented one
in thread Module provides both of functional interface and object-oriented one
If users choose OO interface, they shouldn't be able to call 'get_foo' method. How can I solve this problem?
I'm not very well versed in Perl's OO, so someone please correct me if I'm wrong, but I don't think you can forbid users from calling it. The only thing you can do is throw an error on unexpected arguments.
(There is a convention that a class's private methods' names begin with the underscore character, though.)