Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

I think this fixes issue #2. #3

Merged
merged 1 commit into from

2 participants

David Mertens Joel Berger
David Mertens

Currently, pkgconfig objects (as stored in Alien::MyModule::ConfigData)
were properly pulling in their serialized selves and blessing
themselves into their proper ::PkgConfig classes. However, there
was no guarantee that the Perl module that implemented that class
was present. This change adds a check that runs through all
PkgConfig objects and loads the modules by the same name as their
blessing.

fixes #2

David Mertens run4flat Load modules for pkgconfig blessed classes
Currently, pkgconfig objects (as stored in Alien::MyModule::ConfigData)
were properly pulling in their serialized selves and blessing
themselves into their proper ::PkgConfig classes. However, there
was no guarantee that the Perl module that implemented that class
was present. This change adds a check that runs through all
PkgConfig objects and loads the modules by the same name as their
blessing.

fixes #2
e6c9d9d
Joel Berger jberger merged commit c2c7f13 into from
Joel Berger
Owner

The interesting thing is that I don't think this has been an issue before, but also I don't think it can hurt to add this check. Further the way the testing works, this problem wouldn't be seen, so its good to cover all the bases here. Thanks David.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 3, 2012
  1. David Mertens

    Load modules for pkgconfig blessed classes

    run4flat authored
    Currently, pkgconfig objects (as stored in Alien::MyModule::ConfigData)
    were properly pulling in their serialized selves and blessing
    themselves into their proper ::PkgConfig classes. However, there
    was no guarantee that the Perl module that implemented that class
    was present. This change adds a check that runs through all
    PkgConfig objects and loads the modules by the same name as their
    blessing.
    
    fixes #2
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/Alien/Base.pm
6 lib/Alien/Base.pm
View
@@ -96,6 +96,12 @@ sub pkgconfig {
croak "No Alien::Base::PkgConfig objects are stored!"
unless keys %all;
+
+ # Run through all pkgconfig objects and ensure that their modules are loaded:
+ for my $pkg_obj (values %all) {
+ my $perl_module_name = blessed $pkg_obj;
+ eval "require $perl_module_name";
+ }
return @all{@_} if @_;
Something went wrong with that request. Please try again.