API wrapper best practices?

Kieren Diment diment at gmail.com
Sat Mar 23 23:15:52 GMT 2013


I don't think there's any special magic involved.  Consider DBIx::Class::Schema::Loader or its opposite $schema->deploy https://metacpan.org/module/DBIx::Class::Schema#deploy

Mostly integration with some existing system is a matter of ticking off all the detail and banging your head against any existing bits of the system that behave in interesting ways.

This article also looks interesting. http://modernperlbooks.com/mt/2011/05/testing-dbix-models-without-the-database.html

On 24/03/2013, at 9:51 AM, DAVID HODGKINSON wrote:

> 
> On 23 Mar 2013, at 21:19, Dave Lambley <dave.lambley at gmail.com> wrote:
> 
>> On 23 March 2013 20:50, DAVID HODGKINSON <davehodg at gmail.com> wrote:
>>> Are there any tutorial type docs for Moose Meta the way you used it or
>>> which man page should I be able to work it out from?
>> 
>> Moose::Meta::Class and Moose::Meta::Attribute are probably what you
>> want.  I have an over engineered example here,
>> 
>> https://github.com/OpenIMP/OpenIMP-APIClient/blob/master/lib/OpenIMP/APIClient/Loader.pm#L121
>> 
>> where a schema described in YAML is inflated into a Moose class hierarchy.
> 
> Hm. I'll look at this.
> 
> In my use-case both APIs are going to poke stuff straight into a database
> so you're probably going tell me there's Cat Model stuff I should be
> doing too...?




More information about the london.pm mailing list