Ignore:
Timestamp:
Jun 1, 2008, 4:02:46 AM (16 years ago)
Author:
Geoffrey Thomas <geofft@mit.edu>
Branches:
barnowl_perlaim
Children:
403198c
Parents:
a1c2f06
Message:
Potential fix to Net::OSCAR to make it deal with coderefs in @INC
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/AIM/lib/Net/OSCAR/XML.pm

    ra1c2f06 r5fcf137  
    5151        if(!$NO_XML_CACHE) {
    5252                foreach (@INC) {
    53                         next unless -f "$_/Net/OSCAR/XML/Protocol.parsed-xml";
    54 
    55                         open(XMLCACHE, "$_/Net/OSCAR/XML/Protocol.parsed-xml") or next;
     53                        next unless ref($_) eq 'CODE' || -f "$_/Net/OSCAR/XML/Protocol.parsed-xml";
     54
     55                        if (ref($_) eq 'CODE') {
     56                                *XMLCACHE = $_->($_, 'Net/OSCAR/XML/Protocol.parsed-xml');
     57                                next if (\*XMLCACHE == undef);
     58                        } else {
     59                                open(XMLCACHE, "$_/Net/OSCAR/XML/Protocol.parsed-xml") or next;
     60                        }
    5661                        my $xmlcache = join("", <XMLCACHE>);
    5762                        close(XMLCACHE);
Note: See TracChangeset for help on using the changeset viewer.