App-olson

 view release on metacpan or  search on metacpan

t/attr.t  view on Meta::CPAN

};
is_deeply $a->{xget}->({ region=>{
	location_coords => "+513030-0000731",
	olson_description => "Frobnitzshire",
	timezone_name => "Europe/Frobnitz",
} }), \"Frobnitzshire";
is_deeply san(pa("region_description")), san($a);

$a = pa("k");
is_deeply san($a), {
	type => $App::olson::type{zone_name},
	check_value => "CODE",
	cost => 1,
	get_needs => { z=>undef },
	xget => "CODE",
};
is_deeply san(pa("canonical_zone_name")), san($a);

eval { pa("z\@now") };
is $@, "unwanted `\@' parameter for timezone name attribute\n";

eval { pa("o") };
is $@, "offset attribute needs a `\@' parameter\n";

eval { pa("o\@now\@now") };
is $@, "clashing `\@' parameters for offset attribute\n";

$a = pa("o\@now");
is_deeply san($a), {
	type => $App::olson::type{offset},
	check_value => "CODE",
	cost => 10,
	get_needs => { z=>undef },
	xget => "CODE",
};
is_deeply san(pa("o  \@  now")), san($a);
is_deeply san(pa("offset\@now")), san($a);

$a = pa("i\@now");
is_deeply san($a), {
	type => $App::olson::type{initialism},
	check_value => "CODE",
	cost => 10,
	get_needs => { z=>undef },
	xget => "CODE",
};
is_deeply san(pa("initialism\@now")), san($a);

$a = pa("d\@now");
is_deeply san($a), {
	type => $App::olson::type{truth},
	check_value => "CODE",
	cost => 10,
	get_needs => { z=>undef },
	xget => "CODE",
};
is_deeply san(pa("dst_status\@now")), san($a);

$a = pa("t\@now");
is_deeply san($a), {
	type => $App::olson::type{calendar_time},
	check_value => "CODE",
	cost => 11,
	get_needs => { z=>undef },
	xget => "CODE",
};
is_deeply san(pa("local_time\@now")), san($a);

1;



( run in 1.062 second using v1.01-cache-2.11-cpan-98e64b0badf )