Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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 :)

Replies are listed 'Best First'.
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 (Chancellor) on Jul 14, 2013 at 09:14 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1044170]
Approved by tobyink
[LanX]: oh I meant fixed amount
[LanX]: every path must have l left and r right edges and l and r are fixed and l+r is the height
[LanX]: simple recursive function which goes left and right till l or r are exhausted
LanX #solved
[oiskuu]: I must watch Police Academy again sometime.

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2018-03-19 11:24 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (239 votes). Check out past polls.