Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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
[tye]: We use auditd for security monitoring. So we can rely on auditing being enabled. I'm not sure who would want to not be able to audit. Maybe some VM inside another system with audit?
[SuicideJunkie]: spies would want a system to not be able to audit.
[erix]: spies should use a type-writer, no power needed, no auditable
[erix]: if all else fails, eat the paper

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2017-06-23 20:17 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (555 votes). Check out past polls.