in reply to Re^3: Module provides both of functional interface and object-oriented one
in thread Module provides both of functional interface and object-oriented one
If a module looks as follows:
users may write as follows:package Foo; @EXPORT_OK = qw(get_foo); sub new { # constructer } sub get { # for OO interface } sub get_foo { # for procedural interface } 1;
If users choose OO interface, they shouldn't be able to call 'get_foo' method. How can I solve this problem?$o = Foo->new(); $o->get($key); # of cource, $value $o->get_foo($key); # what's this?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Module provides both of functional interface and object-oriented one
by Anonymous Monk on Feb 17, 2012 at 10:49 UTC |
In Section
Seekers of Perl Wisdom