Hades-Macro-YAML

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Hades-Macro-YAML

0.01    Date/time
        First version, released on an unsuspecting world.

MANIFEST  view on Meta::CPAN

Changes
ignore.txt
lib/Hades/Macro/YAML.pm
macro-yaml.hades
Makefile.PL
MANIFEST			This list of files
README
t/00-load.t
t/Hades-Macro-YAML.t
t/manifest.t
t/pod-coverage.t
t/pod.t
xt/boilerplate.t
META.yml                                 Module YAML meta-data (added by MakeMaker)
META.json                                Module JSON meta-data (added by MakeMaker)

META.json  view on Meta::CPAN

   ],
   "dynamic_config" : 1,
   "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010",
   "license" : [
      "artistic_2"
   ],
   "meta-spec" : {
      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
      "version" : 2
   },
   "name" : "Hades-Macro-YAML",
   "no_index" : {
      "directory" : [
         "t",
         "inc"
      ]
   },
   "prereqs" : {
      "build" : {
         "requires" : {
            "ExtUtils::MakeMaker" : "0"

META.yml  view on Meta::CPAN

  ExtUtils::MakeMaker: '0'
  Test::More: '0'
configure_requires:
  ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010'
license: artistic_2
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: Hades-Macro-YAML
no_index:
  directory:
    - t
    - inc
requires:
  Hades: '0.17'
  YAML::XS: '0'
  perl: '5.006'
version: 0.04
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

Makefile.PL  view on Meta::CPAN

	'YAML::XS';
} || eval {
	require YAML::PP;
	'YAML::PP';
} || eval {
	require YAML;
	'YAML';
} || 'YAML::XS';

my %WriteMakefileArgs = (
    NAME             => 'Hades::Macro::YAML',
    AUTHOR           => q{LNATION <email@lnation.org>},
    VERSION_FROM     => 'lib/Hades/Macro/YAML.pm',
    ABSTRACT_FROM    => 'lib/Hades/Macro/YAML.pm',
    LICENSE          => 'artistic_2',
    MIN_PERL_VERSION => '5.006',
    CONFIGURE_REQUIRES => {
        'ExtUtils::MakeMaker' => '0',
    },
    TEST_REQUIRES => {
        'Test::More' => '0',
    },
    PREREQ_PM => {
        'Hades'         => '0.17',
    	$YAML_CLASS	=> '0',
    },
    dist  => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
    clean => { FILES => 'Hades-Macro-YAML-*' },
);

# Compatibility with old versions of ExtUtils::MakeMaker
unless (eval { ExtUtils::MakeMaker->VERSION('6.64'); 1 }) {
    my $test_requires = delete $WriteMakefileArgs{TEST_REQUIRES} || {};
    @{$WriteMakefileArgs{PREREQ_PM}}{keys %$test_requires} = values %$test_requires;
}

unless (eval { ExtUtils::MakeMaker->VERSION('6.55_03'); 1 }) {
    my $build_requires = delete $WriteMakefileArgs{BUILD_REQUIRES} || {};

README  view on Meta::CPAN

Hades-Macro-YAML

The README is used to introduce the module and provide instructions on
how to install the module, any machine dependencies it may have (for
example C compilers and installed libraries) and any other information
that should be provided before the module is installed.

A README file is required for CPAN modules since CPAN extracts the README
file from a module distribution so that people browsing the archive
can use it to get an idea of the module's uses. It is usually a good idea
to provide version information here so that people can decide whether

README  view on Meta::CPAN

	perl Makefile.PL
	make
	make test
	make install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

    perldoc Hades::Macro::YAML

You can also look for information at:

    RT, CPAN's request tracker (report bugs here)
        https://rt.cpan.org/NoAuth/Bugs.html?Dist=Hades-Macro-YAML

    AnnoCPAN, Annotated CPAN documentation
        http://annocpan.org/dist/Hades-Macro-YAML

    CPAN Ratings
        https://cpanratings.perl.org/d/Hades-Macro-YAML

    Search CPAN
        https://metacpan.org/release/Hades-Macro-YAML


LICENSE AND COPYRIGHT

This software is Copyright (c) 2020 by LNATION.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)

ignore.txt  view on Meta::CPAN

.build/
_build/
cover_db/
blib/
inc/
.lwpcookies
.last_cover_stats
nytprof.out
pod2htm*.tmp
pm_to_blib
Hades-Macro-YAML-*
Hades-Macro-YAML-*.tar.gz

lib/Hades/Macro/YAML.pm  view on Meta::CPAN

package Hades::Macro::YAML;
use strict;
use warnings;
use base qw/Hades::Macro/;
our $VERSION = 0.04;
our ( $YAML_CLASS, $CLASS_LOADED );

BEGIN {
	$YAML_CLASS = eval {
		require YAML::XS;
		'YAML::XS';
	} || eval {
		require YAML::PP;
		'YAML::PP';

lib/Hades/Macro/YAML.pm  view on Meta::CPAN

	return $code;

}

1;

__END__

=head1 NAME

Hades::Macro::YAML - Hades macro helpers for YAML

=head1 VERSION

Version 0.04

=cut

=head1 SYNOPSIS

Quick summary of what the module does:

lib/Hades/Macro/YAML.pm  view on Meta::CPAN


		YAML::XS::LoadFile($file);
	}

	1;

=head1 SUBROUTINES/METHODS

=head2 new

Instantiate a new Hades::Macro::YAML object.

	Hades::Macro::YAML->new

=head2 yaml_load_string

call yaml_load_string method. Expects param $mg to be a Object, param $str to be a Str, param $param to be a Optional[Str], param $list to be a Optional[Bool].

	$obj->yaml_load_string($mg, $str, $param, $list)

=head2 _yaml_load_string_YAML

call _yaml_load_string_YAML method. Expects param $mg to be a Object, param $str to be a Str, param $param to be a Optional[Str], param $list to be a Optional[Bool].

lib/Hades/Macro/YAML.pm  view on Meta::CPAN


	$obj->macro($value);

=head1 AUTHOR

LNATION, C<< <email at lnation.org> >>

=head1 BUGS

Please report any bugs or feature requests to C<bug-hades::macro::yaml at rt.cpan.org>, or through
the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Hades-Macro-YAML>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Hades::Macro::YAML

You can also look for information at:

=over 4

=item * RT: CPAN's request tracker (report bugs here)

L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=Hades-Macro-YAML>

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/Hades-Macro-YAML>

=item * CPAN Ratings

L<https://cpanratings.perl.org/d/Hades-Macro-YAML>

=item * Search CPAN

L<https://metacpan.org/release/Hades-Macro-YAML>

=back

=head1 ACKNOWLEDGEMENTS

=head1 LICENSE AND COPYRIGHT

This software is Copyright (c) 2020 by LNATION.

This is free software, licensed under:

macro-yaml.hades  view on Meta::CPAN

lib lib
tlib t
author LNATION
email email@lnation.org
version 0.04
Hades::Macro::YAML base Hades::Macro {
	abstract { Hades macro helpers for YAML }
	synopsis {
Quick summary of what the module does:

	Hades->run({
		eval => q|
			macro {
				YAML
			}
			Kosmos { 

t/00-load.t  view on Meta::CPAN

#!perl -T
use 5.006;
use strict;
use warnings;
use Test::More;

plan tests => 1;

BEGIN {
    use_ok( 'Hades::Macro::YAML' ) || print "Bail out!\n";
}

diag( "Testing Hades::Macro::YAML $Hades::Macro::YAML::VERSION, Perl $], $^X" );

t/Hades-Macro-YAML.t  view on Meta::CPAN

use Test::More;
use strict;
use warnings;
our ( $sub, $globref );

BEGIN {
	use_ok('Hades::Macro::YAML');
	$sub     = sub { };
	$globref = \*globref;
}
subtest 'new' => sub {
	plan tests => 9;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	ok( $obj = Hades::Macro::YAML->new(),
		q{$obj = Hades::Macro::YAML->new()}
	);
	isa_ok( $obj, 'Hades::Macro::YAML' );
	ok( $obj = Hades::Macro::YAML->new( {} ),
		q{$obj = Hades::Macro::YAML->new({})}
	);
	ok( $obj = Hades::Macro::YAML->new(),
		q{$obj = Hades::Macro::YAML->new()}
	);
	is_deeply(
		$obj->macro,
		[   qw/
			    yaml_load_string
			    yaml_load_file
			    yaml_write_string
			    yaml_write_file
			    /
		],
		q{$obj->macro}
	);
	ok( $obj = Hades::Macro::YAML->new( { macro => ['test'] } ),
		q{$obj = Hades::Macro::YAML->new({ macro => ['test'] })}
	);
	eval { $obj = Hades::Macro::YAML->new( { macro => {} } ) };
	like(
		$@,
		qr/invalid|type|constraint|greater|atleast/,
		q{$obj = Hades::Macro::YAML->new({ macro => {} })}
	);
	eval { $obj = Hades::Macro::YAML->new( { macro => 'limos' } ) };
	like(
		$@,
		qr/invalid|type|constraint|greater|atleast/,
		q{$obj = Hades::Macro::YAML->new({ macro => 'limos' })}
	);
};
subtest 'macro' => sub {
	plan tests => 6;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, 'macro' );
	is_deeply( $obj->macro( ['test'] ), ['test'], q{$obj->macro(['test'])} );
	eval { $obj->macro( {} ) };
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->macro({})} );
	eval { $obj->macro('penthos') };
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->macro('penthos')} );
	is_deeply( $obj->macro, ['test'], q{$obj->macro} );
};
subtest 'yaml_load_string' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, 'yaml_load_string' );
	eval { $obj->yaml_load_string( [], 'phobos', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->yaml_load_string([], 'phobos', undef, undef)}
	);
	eval { $obj->yaml_load_string( 'hypnos', 'phobos', undef, undef ) };
	like(

t/Hades-Macro-YAML.t  view on Meta::CPAN

		$obj->yaml_load_string( bless( {}, 'Test' ), 'phobos', undef, {} );
	};
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->yaml_load_string(bless({}, 'Test'), 'phobos', undef, {})}
	);
};
subtest '_yaml_load_string_YAML' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_load_string_YAML' );
	eval { $obj->_yaml_load_string_YAML( [], 'algea', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_string_YAML([], 'algea', undef, undef)}
	);
	eval { $obj->_yaml_load_string_YAML( 'algea', 'algea', undef, undef ) };
	like(

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->_yaml_load_string_YAML( bless( {}, 'Test' ),
			'algea', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_string_YAML(bless({}, 'Test'), 'algea', undef, {})}
	);
};
subtest '_yaml_load_string_YAML_XS' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_load_string_YAML_XS' );
	eval { $obj->_yaml_load_string_YAML_XS( [], 'limos', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_string_YAML_XS([], 'limos', undef, undef)}
	);
	eval { $obj->_yaml_load_string_YAML_XS( 'nosoi', 'limos', undef, undef ) };
	like(

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->_yaml_load_string_YAML_XS( bless( {}, 'Test' ),
			'limos', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_string_YAML_XS(bless({}, 'Test'), 'limos', undef, {})}
	);
};
subtest '_yaml_load_string_YAML_PP' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_load_string_YAML_PP' );
	eval { $obj->_yaml_load_string_YAML_PP( [], 'hypnos', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_string_YAML_PP([], 'hypnos', undef, undef)}
	);
	eval {
		$obj->_yaml_load_string_YAML_PP( 'hypnos', 'hypnos', undef, undef );

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->_yaml_load_string_YAML_PP( bless( {}, 'Test' ),
			'hypnos', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_string_YAML_PP(bless({}, 'Test'), 'hypnos', undef, {})}
	);
};
subtest 'yaml_load_file' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, 'yaml_load_file' );
	eval { $obj->yaml_load_file( [], 'thanatos', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->yaml_load_file([], 'thanatos', undef, undef)}
	);
	eval { $obj->yaml_load_file( 'hypnos', 'thanatos', undef, undef ) };
	like(

t/Hades-Macro-YAML.t  view on Meta::CPAN

		$obj->yaml_load_file( bless( {}, 'Test' ), 'thanatos', undef, {} );
	};
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->yaml_load_file(bless({}, 'Test'), 'thanatos', undef, {})}
	);
};
subtest '_yaml_load_file_YAML' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_load_file_YAML' );
	eval { $obj->_yaml_load_file_YAML( [], 'phobos', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_file_YAML([], 'phobos', undef, undef)}
	);
	eval { $obj->_yaml_load_file_YAML( 'phobos', 'phobos', undef, undef ) };
	like(

t/Hades-Macro-YAML.t  view on Meta::CPAN

	);
	eval {
		$obj->_yaml_load_file_YAML( bless( {}, 'Test' ), 'phobos', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_file_YAML(bless({}, 'Test'), 'phobos', undef, {})}
	);
};
subtest '_yaml_load_file_YAML_XS' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_load_file_YAML_XS' );
	eval { $obj->_yaml_load_file_YAML_XS( [], 'hypnos', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_file_YAML_XS([], 'hypnos', undef, undef)}
	);
	eval { $obj->_yaml_load_file_YAML_XS( 'aporia', 'hypnos', undef, undef ) };
	like(

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->_yaml_load_file_YAML_XS( bless( {}, 'Test' ),
			'hypnos', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_file_YAML_XS(bless({}, 'Test'), 'hypnos', undef, {})}
	);
};
subtest '_yaml_load_file_YAML_PP' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_load_file_YAML_PP' );
	eval { $obj->_yaml_load_file_YAML_PP( [], 'nosoi', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_file_YAML_PP([], 'nosoi', undef, undef)}
	);
	eval {
		$obj->_yaml_load_file_YAML_PP( 'thanatos', 'nosoi', undef, undef );

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->_yaml_load_file_YAML_PP( bless( {}, 'Test' ),
			'nosoi', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_load_file_YAML_PP(bless({}, 'Test'), 'nosoi', undef, {})}
	);
};
subtest 'yaml_write_string' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, 'yaml_write_string' );
	eval { $obj->yaml_write_string( [], 'thanatos', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->yaml_write_string([], 'thanatos', undef, undef)}
	);
	eval { $obj->yaml_write_string( 'penthos', 'thanatos', undef, undef ) };
	like(

t/Hades-Macro-YAML.t  view on Meta::CPAN

	);
	eval {
		$obj->yaml_write_string( bless( {}, 'Test' ), 'thanatos', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->yaml_write_string(bless({}, 'Test'), 'thanatos', undef, {})}
	);
};
subtest '_yaml_write_string_YAML' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_write_string_YAML' );
	eval { $obj->_yaml_write_string_YAML( [], 'limos', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_string_YAML([], 'limos', undef, undef)}
	);
	eval { $obj->_yaml_write_string_YAML( 'hypnos', 'limos', undef, undef ) };
	like(

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->_yaml_write_string_YAML( bless( {}, 'Test' ),
			'limos', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_string_YAML(bless({}, 'Test'), 'limos', undef, {})}
	);
};
subtest '_yaml_write_string_YAML_XS' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_write_string_YAML_XS' );
	eval { $obj->_yaml_write_string_YAML_XS( [], 'hypnos', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_string_YAML_XS([], 'hypnos', undef, undef)}
	);
	eval {
		$obj->_yaml_write_string_YAML_XS( 'penthos', 'hypnos', undef, undef );

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->_yaml_write_string_YAML_XS( bless( {}, 'Test' ),
			'hypnos', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_string_YAML_XS(bless({}, 'Test'), 'hypnos', undef, {})}
	);
};
subtest '_yaml_write_string_YAML_PP' => sub {
	plan tests => 10;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_write_string_YAML_PP' );
	eval { $obj->_yaml_write_string_YAML_PP( [], 'aporia', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_string_YAML_PP([], 'aporia', undef, undef)}
	);
	eval {
		$obj->_yaml_write_string_YAML_PP( 'thanatos', 'aporia', undef, undef );

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->_yaml_write_string_YAML_PP( bless( {}, 'Test' ),
			'aporia', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_string_YAML_PP(bless({}, 'Test'), 'aporia', undef, {})}
	);
};
subtest 'yaml_write_file' => sub {
	plan tests => 12;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, 'yaml_write_file' );
	eval { $obj->yaml_write_file( [], 'geras', 'limos', undef, undef ) };
	like(
		$@,
		qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->yaml_write_file([], 'geras', 'limos', undef, undef)}
	);
	eval { $obj->yaml_write_file( 'geras', 'geras', 'limos', undef, undef ) };
	like(

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->yaml_write_file( bless( {}, 'Test' ),
			'geras', 'limos', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->yaml_write_file(bless({}, 'Test'), 'geras', 'limos', undef, {})}
	);
};
subtest '_yaml_write_file_YAML' => sub {
	plan tests => 12;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_write_file_YAML' );
	eval {
		$obj->_yaml_write_file_YAML( [], 'thanatos', 'nosoi', undef, undef );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_file_YAML([], 'thanatos', 'nosoi', undef, undef)}
	);
	eval {
		$obj->_yaml_write_file_YAML( 'phobos', 'thanatos', 'nosoi', undef,

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->_yaml_write_file_YAML( bless( {}, 'Test' ),
			'thanatos', 'nosoi', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_file_YAML(bless({}, 'Test'), 'thanatos', 'nosoi', undef, {})}
	);
};
subtest '_yaml_write_file_YAML_XS' => sub {
	plan tests => 12;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_write_file_YAML_XS' );
	eval {
		$obj->_yaml_write_file_YAML_XS( [], 'limos', 'algea', undef, undef );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_file_YAML_XS([], 'limos', 'algea', undef, undef)}
	);
	eval {
		$obj->_yaml_write_file_YAML_XS( 'thanatos', 'limos', 'algea', undef,

t/Hades-Macro-YAML.t  view on Meta::CPAN

	eval {
		$obj->_yaml_write_file_YAML_XS( bless( {}, 'Test' ),
			'limos', 'algea', undef, {} );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_file_YAML_XS(bless({}, 'Test'), 'limos', 'algea', undef, {})}
	);
};
subtest '_yaml_write_file_YAML_PP' => sub {
	plan tests => 12;
	ok( my $obj = Hades::Macro::YAML->new( {} ),
		q{my $obj = Hades::Macro::YAML->new({})}
	);
	can_ok( $obj, '_yaml_write_file_YAML_PP' );
	eval {
		$obj->_yaml_write_file_YAML_PP( [], 'hypnos', 'curae', undef, undef );
	};
	like( $@, qr/invalid|value|type|constraint|greater|atleast/,
		q{$obj->_yaml_write_file_YAML_PP([], 'hypnos', 'curae', undef, undef)}
	);
	eval {
		$obj->_yaml_write_file_YAML_PP( 'hypnos', 'hypnos', 'curae', undef,

xt/boilerplate.t  view on Meta::CPAN


  not_in_file_ok(README =>
    "The README is used..."       => qr/The README is used/,
    "'version information here'"  => qr/to provide version information/,
  );

  not_in_file_ok(Changes =>
    "placeholder date/time"       => qr(Date/time)
  );

  module_boilerplate_ok('lib/Hades/Macro/YAML.pm');


}



( run in 0.702 second using v1.01-cache-2.11-cpan-49f99fa48dc )