| Data-AMF documentation | Contained in the Data-AMF distribution. |
Data::AMF::Parser - deserializer proxy class
my $amf3_parser_class = Data::AMF::Parser->new( version => 3 ); my $amf0_parser_class = Data::AMF::Parser->new( version => 0 ); # or just new without option
Daisuke Murase <typester@cpan.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
| Data-AMF documentation | Contained in the Data-AMF distribution. |
package Data::AMF::Parser; use strict; use warnings; use Data::AMF::Parser::AMF0; use Data::AMF::Parser::AMF3; sub new { my $class = shift; my $args = @_ > 1 ? {@_} : $_[0]; return ($args->{version} || 0) == 3 ? 'Data::AMF::Parser::AMF3' : 'Data::AMF::Parser::AMF0'; } 1; __END__