| WebService-Eventful documentation | Contained in the WebService-Eventful distribution. |
WebService::Eventful::YAML - Use the YAML flavor of the Eventful API
my $evdb = WebService::Eventful->new(app_key => $app_key, flavor => 'yaml');
my $results = $evdb->call('events/get', { id => 'E0-001-001336058-5' });
Parses YAML from the Eventful API.
1.0 - September 2006
Return the flavor name.
Return a checkstring for the expected return content type.
Parse YAML data from the Eventful API using YAML::Syck or YAML.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| WebService-Eventful documentation | Contained in the WebService-Eventful distribution. |
package WebService::Eventful::YAML; use strict; use warnings; use Carp;
our $VERSION = 1.0;
sub flavor { 'yaml' }
sub ctype { 'yaml' }
sub parse { my ($class, $data, $force_array) = @_; carp "Forcing arrays is not supported for API flavor " . $class->flavor if $force_array; eval { require YAML::Syck }; if ($@) { require YAML; return YAML::Load($data); } else { return YAML::Syck::Load($data); } }
1;