Apache2::ASP::Test::Fixtures - Simle text fixtures for Apache2::ASP web applications.


Apache2-ASP documentation Contained in the Apache2-ASP distribution.

Index


Code Index:

NAME

Top

Apache2::ASP::Test::Fixtures - Simle text fixtures for Apache2::ASP web applications.

SYNOPSIS

Top

  my $data = Apache2::ASP::Test::Fixtures->new(
    properties_file => $config->application_root . '/etc/test_fixtures.yaml'
  );

  print $data->message->greeting->english;

METHODS

Top

as_hash( )

Returns a hash or hashref or your test fixture data, depending on the context in which this method is called.

PUBLIC PROPERTIES

Top

Each top-level node in your YAML file is assigned a public accessor.

So if your YAML looks something like this

  ---
  message:
    greeting:
      english: Hello
      spanish: Hola
      french:  Bonjour

You would get an object with a public accessor named message with an accessor named greeting with accessors named english, spanish and french.

BUGS

Top

It's possible that some bugs have found their way into this release.

Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Apache2-ASP to submit bug reports.

HOMEPAGE

Top

Please visit the Apache2::ASP homepage at http://www.devstack.com/ to see examples of Apache2::ASP in action.

AUTHOR

Top

John Drago mailto:jdrago_999@yahoo.com

COPYRIGHT AND LICENSE

Top


Apache2-ASP documentation Contained in the Apache2-ASP distribution.

package Apache2::ASP::Test::Fixtures;

use strict;
use warnings 'all';
use base 'Data::Properties::YAML';


#====================================================================
sub as_hash
{
  wantarray ? %{ $_[0]->{data} } : $_[0]->{data};
}# end as_hash()

1;# return true:

__END__