AMF-Perl

 view release on metacpan or  search on metacpan

doc/examples/cpu/cpu.html  view on Meta::CPAN


<center>
<table width=800 cellspacing=10><tr>
<td align=left width=400 valign=top>
<H2>This is an example of <a href=http://www.simonf.com/amfperl/>AMF::Perl</a> in action.</H2>
<br>
<p>
Download Flash 7 player from <a href="http://www.macromedia.com/shockwave/download/alternates/">here</a> if you don't have it. It even works on Linux!
<p>
These are the 1, 5 and 15 minute load values on this web server. Press Refresh to see the current load.
If you want to use this on your server, but do not have Macromedia authoring tools, you can type your URL instead of the default URL that you see in this Flash movie.
<br>
<a href=cpu.pl>This is the server-side Perl script cpu.pl.</a>
</td>
<td width=400>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" id="CpuExample" width=400 height=400>
<PARAM NAME=movie VALUE="cpu.swf"> 
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>

doc/examples/petmarket/petmarket.sql  view on Meta::CPAN

--
-- Host: localhost    Database: petmarket
---------------------------------------------------------
-- Server version	3.23.56

--
-- Table structure for table 'cart_details'
--

CREATE TABLE cart_details (
  cartid varchar(100) default NULL,
  itemid varchar(10) default NULL,
  quantity int(11) default NULL
) TYPE=MyISAM;

--
-- Dumping data for table 'cart_details'
--


--
-- Table structure for table 'category'
--

CREATE TABLE category (
  catid varchar(10) NOT NULL default ''
) TYPE=MyISAM;

--
-- Dumping data for table 'category'
--


INSERT INTO category VALUES ('BIRDS');
INSERT INTO category VALUES ('REPTILES');
INSERT INTO category VALUES ('DOGS');
INSERT INTO category VALUES ('FISH');
INSERT INTO category VALUES ('CATS');

--
-- Table structure for table 'category_details'
--

CREATE TABLE category_details (
  catid varchar(10) NOT NULL default '',
  name varchar(80) NOT NULL default '',
  image varchar(255) default NULL,
  descn varchar(255) default NULL,
  locale varchar(10) NOT NULL default ''
) TYPE=MyISAM;

--
-- Dumping data for table 'category_details'
--


INSERT INTO category_details VALUES ('BIRDS','Birds','birds_icon.gif','','en-US');
INSERT INTO category_details VALUES ('REPTILES','Reptiles','reptiles_icon.gif','','en-US');
INSERT INTO category_details VALUES ('DOGS','Dogs','dogs_icon.gif','','en-US');
INSERT INTO category_details VALUES ('FISH','Fish','fish_icon.gif','','en-US');
INSERT INTO category_details VALUES ('CATS','Cats','cats_icon.gif','','en-US');

--
-- Table structure for table 'item'
--

CREATE TABLE item (
  itemid varchar(10) NOT NULL default '',
  productid varchar(10) NOT NULL default ''
) TYPE=MyISAM;

--
-- Dumping data for table 'item'
--


INSERT INTO item VALUES ('EST-3','FI-SW-02');
INSERT INTO item VALUES ('EST-15','FL-DSH-01');
INSERT INTO item VALUES ('EST-19','AV-SB-02');

doc/examples/petmarket/petmarket.sql  view on Meta::CPAN

INSERT INTO item VALUES ('EST-20','FI-FW-02');
INSERT INTO item VALUES ('EST-14','FL-DSH-01');
INSERT INTO item VALUES ('EST-11','RP-SN-01');
INSERT INTO item VALUES ('EST-24','K9-RT-02');

--
-- Table structure for table 'item_details'
--

CREATE TABLE item_details (
  itemid varchar(10) NOT NULL default '',
  listprice decimal(10,2) NOT NULL default '0.00',
  unitcost decimal(10,2) NOT NULL default '0.00',
  locale varchar(10) NOT NULL default '',
  image varchar(255) NOT NULL default '',
  descn varchar(255) NOT NULL default '',
  attr1 varchar(80) default NULL,
  attr2 varchar(80) default NULL,
  attr3 varchar(80) default NULL,
  attr4 varchar(80) default NULL,
  attr5 varchar(80) default NULL
) TYPE=MyISAM;

--
-- Dumping data for table 'item_details'
--


INSERT INTO item_details VALUES ('EST-3',0.00,12.00,'en-US','fish4.gif','Salt Water fish from Australia','Toothless','Mean','','','');
INSERT INTO item_details VALUES ('EST-15',0.00,12.00,'en-US','cat3.gif','Great for reducing mouse populations','With tail','','','','');
INSERT INTO item_details VALUES ('EST-19',0.00,2.00,'en-US','bird1.gif','Great stress reliever','Adult Male','','','','');

doc/examples/petmarket/petmarket.sql  view on Meta::CPAN

INSERT INTO item_details VALUES ('EST-20',0.00,2.00,'en-US','fish2.gif','Fresh Water fish from China','Adult Male','','','','');
INSERT INTO item_details VALUES ('EST-14',0.00,12.00,'en-US','cat3.gif','Great for reducing mouse populations','Tailless','','','','');
INSERT INTO item_details VALUES ('EST-11',0.00,12.00,'en-US','lizard3.gif','More Bark than bite','Venomless','','','','');
INSERT INTO item_details VALUES ('EST-24',0.00,92.00,'en-US','dog5.gif','Great addition to a family','Male Puppy','','','','');

--
-- Table structure for table 'product'
--

CREATE TABLE product (
  productid varchar(10) NOT NULL default '',
  catid varchar(10) NOT NULL default ''
) TYPE=MyISAM;

--
-- Dumping data for table 'product'
--


INSERT INTO product VALUES ('K9-RT-01','DOGS');
INSERT INTO product VALUES ('K9-DL-01','DOGS');
INSERT INTO product VALUES ('FI-SW-01','FISH');

doc/examples/petmarket/petmarket.sql  view on Meta::CPAN

INSERT INTO product VALUES ('RP-LI-02','REPTILES');
INSERT INTO product VALUES ('FI-SW-02','FISH');
INSERT INTO product VALUES ('FI-FW-01','FISH');
INSERT INTO product VALUES ('K9-CW-01','DOGS');

--
-- Table structure for table 'product_details'
--

CREATE TABLE product_details (
  productid varchar(10) NOT NULL default '',
  locale varchar(10) NOT NULL default '',
  name varchar(80) NOT NULL default '',
  image varchar(255) default NULL,
  descn varchar(255) default NULL
) TYPE=MyISAM;

--
-- Dumping data for table 'product_details'
--


INSERT INTO product_details VALUES ('K9-RT-01','en-US','Golden Retriever','dog1.gif','Great family dog');
INSERT INTO product_details VALUES ('K9-DL-01','en-US','Dalmation','dog5.gif','Great dog for a Fire Station');
INSERT INTO product_details VALUES ('FI-SW-01','en-US','Angelfish','fish1.jpg','Salt Water fish from Australia');

doc/examples/petmarket/petmarket.sql  view on Meta::CPAN

INSERT INTO product_details VALUES ('RP-LI-02','en-US','Iguana','lizard2.gif','Friendly green friend');
INSERT INTO product_details VALUES ('FI-SW-02','en-US','Tiger Shark','fish4.gif','Salt Water fish from Australia');
INSERT INTO product_details VALUES ('FI-FW-01','en-US','Koi','fish3.gif','Fresh Water fish from Japan');
INSERT INTO product_details VALUES ('K9-CW-01','en-US','Chihuahua','dog4.gif','Great companion dog');

--
-- Table structure for table 'user_details'
--

CREATE TABLE user_details (
  email varchar(50) default NULL,
  password varchar(50) default NULL,
  firstname varchar(50) default NULL,
  lastname varchar(50) default NULL,
  homestreet1 varchar(50) default NULL,
  homestreet2 varchar(50) default NULL,
  homecity varchar(50) default NULL,
  homestate char(2) default NULL,
  homecountry varchar(50) default NULL,
  homezip varchar(10) default NULL,
  homephone varchar(20) default NULL,
  shippingstreet1 varchar(50) default NULL,
  shippingstreet2 varchar(50) default NULL,
  shippingcity varchar(50) default NULL,
  shippingcountry varchar(50) default NULL,
  shippingzip varchar(10) default NULL,
  shippingphone varchar(20) default NULL,
  creditcardnumber varchar(50) default NULL,
  creditcardtype varchar(50) default NULL,
  creditcardexpiry varchar(50) default NULL
) TYPE=MyISAM;

--
-- Dumping data for table 'user_details'
--


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'} } );

lib/AMF/Perl.pm  view on Meta::CPAN


	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.


=head2 EXPORT

None by default.

=head1 SEE ALSO

There is a mailing list for AMF::Perl. You can subscribe here:
http://lists.sourceforge.net/lists/listinfo/flaph-general

The web page for the package is at:
http://www.simonf.com/flap

=head1 AUTHOR

lib/AMF/Perl/App/Executive.pm  view on Meta::CPAN

=item Passing @$a instead of $a to user functions. $a always is an array.

=cut


use strict;
use AMF::Perl::Util::RemotingService;


#The above variable declarations are not needed, as hash keys are used. They are useful just for the comments.
# the directory which should be used for the basic packages default "../"
# my $_basecp = "../";
# the classpath which is the path of the file from $_basecp
#my $_classpath;
# the string name of the package derived from the classpath
#my $_classname;
# the object we build from the package
#my $_classConstruct;
# the method to execute in the construct
#my $_methodname;
# the defined return type

lib/AMF/Perl/App/Executive.pm  view on Meta::CPAN

            print STDERR  "Access error for " . $self->{_headerFilter} . ".\n";
            return;
            }
        }
        
        # check to see if an explicit return type was defined
        if (exists($methodrecord{'returns'}))
        {
            $self->{_returnType} = $methodrecord{'returns'};
        }
        # set the default return type of "unknown"
        else
        {
            $self->{_returnType} = "unknown";
        }
        # set to see if the access was set and the method as remote permissions.
        if ( (exists($methodrecord{'access'})) && (lc ($methodrecord{'access'}) eq "remote"))
        {
            # finally check to see if the method existed
            if ($self->{_classConstruct}->can($method))
            {

lib/AMF/Perl/App/Executive.pm  view on Meta::CPAN


    	if ($serviceobject->can("methodTable") && exists ($serviceobject->methodTable->{$method}))
    	{
			# create a shortcut to the methodTable
        	my %methodrecord = %{$serviceobject->methodTable->{$method}};
        	# check to see if an explicit return type was defined
        	if (exists($methodrecord{'returns'}))
        	{
            	$self->{_returnType} = $methodrecord{'returns'};
        	}
        	# set the default return type of "unknown"
        	else
        	{
            	$self->{_returnType} = "unknown";
        	}
		}
        return $serviceobject->$method(@$a);
    }    
}

sub strrpos



( run in 0.454 second using v1.01-cache-2.11-cpan-0a6323c29d9 )