Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

naming Convention for API modules

by srchulo (Sexton)
on Jul 13, 2013 at 21:42 UTC ( #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 :)

Comment on naming Convention for API modules
Re: naming Convention for API modules
by tobyink (Abbot) 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 (Abbot) on Jul 14, 2013 at 09:14 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
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? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-07-31 03:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls