App-ipinfo

 view release on metacpan or  search on metacpan

lib/App/ipinfo.pm  view on Meta::CPAN

=item * C<%N> - newline

=item * C<%o> - the organization name

=item * C<%r> - the region of the organization  (i.e. state or province)

=item * C<%t> - the timezone of the organization  (e.g. C<America/New_York> )

=item * C<%T> - tab

=item * C<%%> - literal percent

=back

=head2 Class methods

=over 4

=item * new( HASH )


t/format.t  view on Meta::CPAN

	[ hostname     => '%h' => 'one.one.one.one' ],
	[ ip           => '%i' => $ip ],
	[ continent    => '%k' => 'Oceania' ],
	[ latitude     => '%L' => '-27.482000' ],
	[ longitude    => '%l' => '153.013600' ],
	[ country_name => '%n' => 'Australia' ],
	[ organization => '%o' => 'AS13335 Cloudflare, Inc.' ],
	[ timezone     => '%t' => 'Australia/Brisbane' ],
	[ newline      => '%N' => "\n" ],
	[ tab          => '%T' => "\t" ],
	[ percent      => '%%' => "%" ],
	);

subtest 'formats' => sub {
	foreach my $row ( @table ) {
		my( $label, $template, $expected ) = $row->@*;

		subtest $label => sub {
			my $app = $class->new( template => $template );
			isa_ok $app, $class;



( run in 0.373 second using v1.01-cache-2.11-cpan-05162d3a2b1 )