APR-HTTP-Headers-Compat
view release on metacpan or search on metacpan
use warnings;
use lib 'inc';
use Module::Build;
use MyBuilder;
my $builder = MyBuilder->new(
module_name => 'APR::HTTP::Headers::Compat',
license => 'perl',
dist_author => 'Andy Armstrong <andy@hexten.net>',
dist_version_from => 'lib/APR/HTTP/Headers/Compat.pm',
recursive_test_files => 1,
requires => {
'APR::Pool' => 0,
'APR::Table' => 0,
'HTTP::Headers' => 0,
'Storable' => 0,
'Test::More' => 0,
},
add_to_cleanup => ['APR-HTTP-Headers-Compat-*'],
---
name: APR-HTTP-Headers-Compat
version: 0.02
author:
- 'Andy Armstrong <andy@hexten.net>'
abstract: Make an APR::Table look like an HTTP::Headers
license: perl
resources:
bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=APR-HTTP-Headers-Compat
license: http://dev.perl.org/licenses/
repository: git://github.com/AndyA/APR--HTTP--Headers--Compat.git
requires:
APR::Pool: 0
APR::Table: 0
inc/MyBuilder.pm view on Meta::CPAN
$url =~ s!^git\@github\.com:!git://github.com/!;
return $url;
}
return;
}
sub _auto_bugtracker {
'http://rt.cpan.org/NoAuth/Bugs.html?Dist=' . shift->dist_name;
}
sub ACTION_testauthor {
my $self = shift;
$self->test_files( 'xt/author' );
$self->ACTION_test;
}
sub ACTION_critic {
exec qw( perlcritic -1 -q -profile perlcriticrc lib/ ), glob 't/*.t';
}
sub ACTION_tags {
exec(
qw(
t/compat/base/headers.t view on Meta::CPAN
Server: Apache/2.1
Content-Encoding: gzip
Content-Language: no
Content-Type: text/html;
charSet = "ISO-8859-1"; Foo=1
Title: This is a test
EOT
}
$h->clear;
is( $h->www_authenticate( "foo" ), undef );
is( $h->www_authenticate( "bar" ), "foo" );
is( $h->www_authenticate, "bar" );
is( $h->proxy_authenticate( "foo" ), undef );
is( $h->proxy_authenticate( "bar" ), "foo" );
is( $h->proxy_authenticate, "bar" );
is( $h->authorization_basic, undef );
is( $h->authorization_basic( "u" ), undef );
is( $h->authorization_basic( "u", "p" ), "u:" );
is( $h->authorization_basic, "u:p" );
is( j( $h->authorization_basic ), "u|p" );
is( $h->authorization, "Basic dTpw" );
is( eval { $h->authorization_basic( "u2:p" ) }, undef );
ok( $@ );
is( j( $h->authorization_basic ), "u|p" );
is( $h->proxy_authorization_basic( "u2", "p2" ), undef );
is( j( $h->proxy_authorization_basic ), "u2|p2" );
is( $h->proxy_authorization, "Basic dTI6cDI=" );
is( $h->as_string, <<EOT);
Authorization: Basic dTpw
Proxy-Authorization: Basic dTI6cDI=
Proxy-Authenticate: bar
WWW-Authenticate: bar
EOT
#---- old tests below -----
( run in 0.954 second using v1.01-cache-2.11-cpan-5c0b1e786e0 )