CPAN::Testers::WWW::Reports::Parser::YAML - CPAN Testers YAML parser


CPAN-Testers-WWW-Reports-Parser documentation Contained in the CPAN-Testers-WWW-Reports-Parser distribution.

Index


Code Index:

NAME

Top

CPAN::Testers::WWW::Reports::Parser::YAML - CPAN Testers YAML parser

SYNOPSIS

Top

  use CPAN::Testers::WWW::Reports::Parser::YAML;

  my $obj = CPAN::Testers::WWW::Reports::Parser::YAML->new();

  $obj->register( file => $file );  # local file name
  $obj->register( data => $data );  # reference to a data block

  my $data = $obj->raw_data();

DESCRIPTION

Top

This distribution is used to extract the data from a YAML file containing metadata regarding reports submitted by CPAN Testers, and available from the CPAN Testers website.

INTERFACE

Top

The Constructor

* new

Instatiates the object.

Public Methods

* register
* raw_data

BUGS, PATCHES & FIXES

Top

There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties, that is not explained within the POD documentation, please send bug reports and patches to the RT Queue (see below).

Fixes are dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me.

RT: http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Testers-WWW-Reports-Parser

SEE ALSO

Top

http://www.cpantesters.org/, http://stats.cpantesters.org/, http://wiki.cpantesters.org/, http://blog.cpantesters.org/

AUTHOR

Top

  Barbie <barbie@cpan.org> 2009-present

COPYRIGHT AND LICENSE

Top


CPAN-Testers-WWW-Reports-Parser documentation Contained in the CPAN-Testers-WWW-Reports-Parser distribution.

package CPAN::Testers::WWW::Reports::Parser::YAML;

use 5.006;
use strict;
use warnings;

use vars qw($VERSION);
$VERSION = '0.03';

#----------------------------------------------------------------------------
# Library Modules

use YAML::XS    qw(Load LoadFile);

#----------------------------------------------------------------------------
# Variables

#----------------------------------------------------------------------------
# The Application Programming Interface

sub new {
    my $class = shift;
    my $self = {};
    bless $self, $class;
    return $self;
}

sub DESTROY {
    my $self = shift;
}

# full data set methods

sub register {
    my $self = shift;
    my %hash = @_;
    $self->{file} = $hash{file};
    $self->{data} = $hash{data};
}

sub raw_data {
    my $self = shift;
    return Load($self->{data})  if($self->{data});
    return LoadFile($self->{file});
}

q{ Kein Zurück für dich };

__END__