Changeset 5fcf137


Ignore:
Timestamp:
Jun 1, 2008, 4:02:46 AM (12 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
Location:
perl/modules/AIM/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/AIM/lib/BarnOwl/Module/AIM.pm

    r7a1c90d r5fcf137  
    2727                });
    2828    } else {
    29         $oscar = Net::OSCAR->new();
     29        my $oscar = Net::OSCAR->new();
    3030        $oscar->set_callback_im_in(\&on_im_in);
    3131        $oscar->signon($user, $pass);
     
    4343    BarnOwl::queue_message($msg);
    4444}
     45
     46BarnOwl::new_command(aimlogin => \&cmd_aimlogin, {});
     47
     481;
  • 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.