Perl implementation of DDR Simple API

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Perl implementation of DDR Simple API

Rotan Hanrahan
Perl implementation of DDR Simple API

I have uploaded a working draft [1] and highlighted version [2] of a Perl implementation of the final DDR Simple API.

The purpose of this code is to illustrate the API implemented in another of the programming languages that the DDWG identified as a target for the API. The implementation is in a single file, although the file itself represents several packages. It should execute on current Perl systems. The expected output is given in comments at the end of the source code.

The program contains some usage demonstrations, some convenience wrappers around the standard API methods, and a set of API tests derived from the previously presented Java test class.

The repository itself is also in the source code, in the form of a Perl data structure and a set of access methods. In a deployed implementation, one can expect that the actual repository would be an external database or some other such dedicated system, for reasons of performance, management, security etc. However, the program that I have now delivered is entirely in Perl and thus can be examined in isolation.

The implementation claims to support the DDR Core Vocabulary, but in reality I have only coded 11 of the properties, and provided data for a handful of imaginary devices. This is sufficient to illustrate the purpose of the API. There is no benefit from filling in more data.

I will not be working on this code for at least another month, so I have delivered it for your consideration in its current state, without any guarantees. It appears to be functioning as expected.