Bailey has asked for the wisdom of the Perl Monks concerning the following question:

I have a tool in PERL, now want to have a good interface with other system (not in PERL), need help in learning and creating PERL APIs, any pointers? Is there better way to communicate (have interface) between system in PERL and a non PERL system?

Replies are listed 'Best First'.
Re: PERL APIs
by Corion (Patriarch) on Jun 06, 2008 at 19:41 UTC

    The approach really, really depends on the other system. Will the other "non Perl" system be on the same machine? Will the other system be able to embed Perl (perlembed)? Will the other system be able to talk over a socket or IPC to Perl (perlipc)? Will the other system use some RPC mechanism like SOAP or Web Services? Will it use MQSeries?

    Without knowing what the other system supports, it's hard to say which approach to take from Perl.

Re: PERL APIs
by igelkott (Priest) on Jun 07, 2008 at 01:01 UTC

    Chances are, there's a well-developed API in Perl for your external system. Even if there isn't an API now (eg, for a home-made system), Perl is a sufficiently general-purpose language that it may be very easy to make a new one. Try searching with key words appropriate for your system/application.

    As for "learning and creating PERL APIs", the best book or online resource for you of course depends on your background and needs. You could give us a few details or check the Book Reviews on this site.

Re: PERL APIs
by apl (Monsignor) on Jun 06, 2008 at 19:53 UTC