Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: Module provides both of functional interface and object-oriented one

by anazawa (Scribe)
on Feb 17, 2012 at 08:38 UTC ( #954443=note: print w/ replies, xml ) Need Help??


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

I agree with you. According to your idea, users don't need to pass a reference subroutines on every call:

use Blosxom::Header; # procedural interface my $value = Blosxom::Header->get($key); my $bool = Blosxom::Header->exists($key); Blosxom::Header->set($key => $value); Blosxom::Header->remove($key); # OO interface my $h = Blosxom::Header->new(); my $value = $h->get($key); my $bool = $h->exists($key); $h->set($key => $value); $h->remove($key);
Nobody uses my module except for me :) But I belive this module should exist.

Update:

I noticed that it's not necessary to implement OO interface any more in this case.


Comment on Re^4: Module provides both of functional interface and object-oriented one
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://954443]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2015-07-29 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls