Permalink
Browse files

pkgconfig config_data now holds hashref (keys are package name) rathe…

…r than arrayref
  • Loading branch information...
1 parent e964fa6 commit 2bbbf04ce08aee6a8318c5b07a979f6d18e1f9ce @jberger jberger committed Mar 1, 2012
Showing with 5 additions and 4 deletions.
  1. +3 −3 lib/Alien/Base/ModuleBuild.pm
  2. +2 −1 t/zz-example.t
@@ -343,13 +343,13 @@ sub alien_load_pkgconfig {
return unless @$pc_files;
- my @pc_objects = map {
+ my %pc_objects = map {
my $pc = Alien::Base::PkgConfig->new($_);
$pc->make_abstract;
- $pc
+ ($pc->{package}, $pc)
} @$pc_files;
- $self->config_data( pkgconfig => \@pc_objects);
+ $self->config_data( pkgconfig => \%pc_objects);
}
1;
View
@@ -28,7 +28,8 @@ ok( -d '_alien', "ACTION_alien creates _alien (build) directory" );
}
my $pc_objects = $builder->config_data('pkgconfig');
-isa_ok( $pc_objects->[0], 'Alien::Base::PkgConfig', "Generate pkgconfig" );
+my $dontpanic_pc = $pc_objects->{dontpanic};
+isa_ok( $dontpanic_pc, 'Alien::Base::PkgConfig', "Generate pkgconfig" );
$builder->depends_on('build');

0 comments on commit 2bbbf04

Please sign in to comment.