Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

naming Convention for API modules

by srchulo (Sexton)
on Jul 13, 2013 at 21:42 UTC ( [id://1044170]=perlquestion: print w/replies, xml ) Need Help??

srchulo has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I'm creating a perl module that is essentially just a wrapper for an HTTPS API. I've seen several different naming styles for perl modules that interface with APIs, such as WebService::Rackspace::CloudFiles, Net::Stripe, or just PX::API (and I'm sure there are many more). My question is, is there a best way to name API wrapper modules that's most appropriate? Or more fitting based on what kind of API it is? Or is it just purely preference? Thanks! Just wanting to make sure I do the perl convention if there is one before I put this up on CPAN :)

Replies are listed 'Best First'.
Re: naming Convention for API modules
by tobyink (Canon) on Jul 13, 2013 at 21:52 UTC

    There isn't really an established convention.

    I'd say focus first on what your module does, rather than how it does it. If it allows you to find the nearest Pizza Hut to a given latitude, longitude pair, end users probably don't much care about whether it's using a web service to do it, whether it just bundles a SQLite database with the co-ordinates of every Pizza Hut branch in the world, or whether it uses Jedi mind tricks. Call it Pizza::Hut::Finder, not WebService::JSON::PizzaHutDotCom.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re: naming Convention for API modules
by kcott (Archbishop) on Jul 14, 2013 at 09:14 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1044170]
Approved by tobyink
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-28 14:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found