| WSST documentation | Contained in the WSST distribution. |
WSST::SchemaParser::YAML - YAML SchemaParser class of WSST
This class is YAML schema parser.
Constructor.
Returns [".yml", ".yaml"]
Parses YAML schema file, and returns Schema object.
http://code.google.com/p/wsst/
Mitsuhisa Oshikawa <mitsuhisa [at] gmail.com> Yusuke Kawasaki <u-suke [at] kawa.net>
Copyright 2008 WSS Project Team
| WSST documentation | Contained in the WSST distribution. |
package WSST::SchemaParser::YAML; use strict; use base qw(WSST::SchemaParser); use YAML (); our $VERSION = '0.1.1'; sub new { my $class = shift; my $self = {}; return bless($self, $class); } sub types { return [".yml", ".yaml"]; } sub parse { my $self = shift; my $path = shift; my $data = YAML::LoadFile($path); return WSST::Schema->new($data); }
1;