File: obj_yaml_parser.pm

package info (click to toggle)
libgo-perl 0.15-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,112 kB
  • sloc: perl: 13,147; sh: 21; makefile: 7
file content (17 lines) | stat: -rw-r--r-- 307 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package GO::Parsers::obj_yaml_parser;
use strict;
use base qw(GO::Parsers::obj_emitter GO::Parsers::base_parser);
use GO::Model::Graph;
use YAML;

sub parse_fh {
    my ($self, $fh) = @_;
    my $str = join('',<$fh>);
    $fh->close;
    my $g = Load($str);
    $self->emit_graph($g);
    return $g;
}


1;