Permalink
Browse files

apply Philip Gwyn's patch for better external data marshaller support

  • Loading branch information...
1 parent 55b01ad commit 23252f7331439974b4e07d91fc9efc3c1a7383ab @rcaputo committed Jul 16, 2001
Showing with 14 additions and 2 deletions.
  1. +14 −2 lib/POE/Filter/Reference.pm
@@ -56,8 +56,20 @@ sub new {
$freezer ||= _default_freezer();
# not a reference... maybe a package?
unless(ref $freezer) {
- unless(exists $::{$freezer.'::'}) {
- eval {require "$freezer.pm"; import $freezer ();};
+ my $symtable=$::{"main::"};
+ my $loaded=1; # find out of the package was loaded
+ foreach my $p (split /::/, $freezer) {
+ unless(exists $symtable->{"$p\::"}) {
+ $loaded=0;
+ last;
+ }
+ $symtable=$symtable->{"$p\::"};
+ }
+
+ unless($loaded) {
+ my $q=$freezer;
+ $q=~s(::)(/)g;
+ eval {require "$q.pm"; import $freezer ();};
croak $@ if $@;
}
}

0 comments on commit 23252f7

Please sign in to comment.