Dana - Sorry, I don't know anything about HDF (except what I've read on the web this morning). I don't work with it, but there is a PDL module for HDF. The CPAN page for it is here: http://search.cpan.org/~chm/PDL-2.4.4/IO/HDF/HDF.pm
People who have worked on the PDL module in the past and may be interested in helping out would include: [email protected] (current PDL HDF maintainer) [email protected] (former PDL HDF contributor) [email protected] (former PDL HDF contributor) I obtained these email addresses directly from the CPAN page linked above, so there's no guarantee that these emails are still current. However, there's no shame in trying (at least, I don't think there is... :) If I understand rightly, you're being asked to interface a C or C++ library to Perl, right? You should definitely check out Perl Monks and see if anybody there has thoughts or ideas on where to start. For actually learning about the language, I recommend reading the Learning Perl/Intermediate Perl books, as well as Perl Best Practices. Regarding your specific thoughts about making a Perlish interface to the format (again, check Perlmonks for probably better suggestions), here are my thoughts, in order from simple to amitious: 1. HDF seems to have a complex interface, so your best bet would be to create an object-oriented interface that can be accessed directly from Perl, much in the same way that PDL offers a Perlish object-oriented interface to its underlying C data structure and ops. If you have a C++ interface, then emulating that would probably be a good place to start. 2. You might also consider creating a tied hash interface, which would give your interface a much simpler and even more Perlish feel to it. However, chances are pretty good that the hash interface would have only limited functionality, so that if the user wanted the full capabilities of the HDF library, they would need to use the object interface. 3. Some of the data in HDF is tabular, surely, in which case creating a PDL interface to that would allow users to access the highly developed and speedy machinery available in PDL for analyzing their data. (BTW - PDL works with arrays of any dimension, not just 2D, which the term 'tabular' might imply.) Crunching these sorts of data with PDL routines could be highly optimized and tested without having to write XS code, which would be nice. 4. Still, your users will probably want to be able to write highly optimized code, on par with compiled C, for the complex structures as well. For this, you should make sure that they can access the objects via XS code. I highly recommend figuring out a way to do this using the Inline module, which you can read more about here: http://search.cpan.org/~ingy/Inline-0.44/Inline.pod Good luck, and weclcome to Perl! David
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
