Alien-Packages
view release on metacpan or search on metacpan
t/01-simple.t view on Meta::CPAN
require Alien::Packages;
my $extensive_tests = $ENV{AUTHOR_TESTING} || $ENV{KWALITEE_TESTING};
my $ap = Alien::Packages->new();
ok( $ap, "Instantiating" );
my @packages = $ap->list_packages();
# can't check result: Slackware, Gentoo, OpenBSD, MirBSD, IRIX, HP-UX, ...
ok( 1, "still alive after list_packages" );
if( @packages )
{
# for the author, to see if there is something
my %pkgtypes = map { $_->{PkgType} => $_ } @packages;
foreach my $pkg (values %pkgtypes)
{
diag( "{ " . join( ", ", map { $_ . " => " . $pkg->{$_} } keys %{$pkg} ) . " }" );
}
t/01-simple.t view on Meta::CPAN
eval {
require File::Which;
@perls = File::Which::where( 'perl' );
};
my $perlbin = realpath( $Config{perlpath} );
my %perls = map { $_ => 1 } ( @perls, $perlbin );
@perls = keys %perls;
my @files = @perls;
$extensive_tests and push( @files, values %INC );
my %assoc_pkgs = $ap->list_fileowners( @files );
ok( 1, "still alive after list_fileowners" );
# can't check result, could be unsupported pkg type or wild installation (e.g. blead)
if( keys %assoc_pkgs )
{
# for the author, to see if there is something
foreach my $perl (@perls)
{
my $perl_pkg = $assoc_pkgs{$perl} or next;
diag( "$perl is registered in { " . join( ", ", map { $_ . " => " . $perl_pkg->[0]{$_} } keys %{$perl_pkg->[0]} ) . " }" );
}
( run in 2.167 seconds using v1.01-cache-2.11-cpan-df04353d9ac )