简体   繁体   中英

How can I call a Perl subroutine from Flex?

I'm new to Perl as well as Flex. I've just gone through the basic (and exciting) stuff in both of them. I just want to call a Perl subroutine from Flex. Is it possible? If so how?

There are three ways that a Flex web app can access remote systems:

  1. Through an HTTP Get operation using HTTPService ( http://livedocs.adobe.com/flex/3/html/data_access_2.html )
  2. Through a SOAP Web Service using WebService ( http://livedocs.adobe.com/flex/3/html/data_access_3.html )
  3. Through a RemoteObject call using RemoteObject ( http://livedocs.adobe.com/flex/3/html/data_access_4.html )

For Number 1, just use the URL to a page that executes the Perl code on the server should work fine.
For Number 2, look for info here: http://www.perl.com/pub/a/2001/01/soap.html on creating Web Services with Perl. For number 3, look into this http://www.simonf.com/flap/ for setting up an AMF gateway with Perl.

Number 3 would be my preferred option, however I would suspect that number 1 is going to be easiest to get up and running with.

Let me say something which you have digest first, i doubt flex and perl community is large enough compared to Flex and Java or PHP.

Flex and perl via XML

http://giantflyingsaucer.com/blog/?p=575

Update:

http://www.simonf.com/flap/code.html

The above link shows on how to communicate Flex with perl function, yet again the docs are not clear and there is no such good example in the google as far as i found.

Perl though was built for even web app, but perl's real usage lies some where. I suggest you to learn PHP or JAVA and then communicate them with Adobe Flex.

Very nice question though!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM