AMF-Perl
view release on metacpan or search on metacpan
lib/AMF/Perl.pm view on Meta::CPAN
package AMF::Perl;
use 5.00000;
use strict;
require Exporter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
@ISA = qw(Exporter);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
# This allows declaration use AMF::Perl ':all';
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
# will save memory.
%EXPORT_TAGS = ( 'all' => [ qw(
) ] );
@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
@EXPORT = qw(amf_throw);
$VERSION = '0.15';
=head1 NAME
AMF::Perl - Flash Remoting in Perl
Translated from PHP Remoting v. 0.5b from the -PHP project.
Main gateway class. This is always the file you call from flash remoting-enabled server scripts.
=head1 SYNOPSIS
This code should be present in your AMF::Perl gateway script, the one called by the Flash client.
To enable the client to call method bar() under service Foo,
make sure MyCLass has a method called bar() and register an instance of your class.
my $object = new MyClass();
my $gateway = AMF::Perl->new;
$gateway->registerService("Foo",$object);
$gateway->service();
Or, if you have many services to register, create a package corresponding to each service
and put them into a separate directory. Then register this directory name.
In the example below directory "services" may contain Foo.pm, Bar.pm etc.
Therefore, services Foo and Bar are available. However, these packages must have a function
called methodTable returning the names and descriptions of all possible methods to invoke.
See the documentation and examples for details.
my $gateway = AMF::Perl->new;
$gateway->setBaseClassPath('./services');
$gateway->service();
=head1 ABSTRACT
Macromedia Flash Remoting server-side support.
=head1 DESCRIPTION
This file accepts the data and deserializes it using the InputStream and Deserializer classes.
Then the gateway builds the executive class which then loads the targeted class file
and executes the targeted method via flash remoting.
After the target uri executes the the gateway determines the data type of the data
and serializes and returns the data back to the client.
( run in 1.468 second using v1.01-cache-2.11-cpan-39bf76dae61 )