Changeset 167044b
- Timestamp:
- Aug 20, 2008, 2:16:43 AM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- aef51f8
- Parents:
- 5987370
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/ModuleLoader.pm
r5987370 r167044b 103 103 BarnOwl/Message.pm BarnOwl/Style.pm)); 104 104 105 $BarnOwl::Hooks::startup->clear;106 $BarnOwl::Hooks::getBuddyList->clear;107 $BarnOwl::Hooks::mainLoop->clear;108 $BarnOwl::Hooks::shutdown->clear;109 $BarnOwl::Hooks::receiveMessage->clear;110 105 local $SIG{__WARN__} = \&squelch_redefine; 111 106 $class->load_all; -
perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
rd264c6d r167044b 120 120 } 121 121 122 $BarnOwl::Hooks::startup->add(\&startup); 123 $BarnOwl::Hooks::shutdown->add(\&shutdown); 124 #$BarnOwl::Hooks::mainLoop->add(\&mainloop_hook); 122 $BarnOwl::Hooks::startup->add('BarnOwl::Module::IRC::startup'); 123 $BarnOwl::Hooks::shutdown->add('BarnOwl::Module::IRC::shutdown'); 125 124 126 125 ################################################################################ -
perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
rbfc127b r167044b 68 68 register_keybindings(); 69 69 register_filters(); 70 $BarnOwl::Hooks::mainLoop->add( \&onMainLoop);71 $BarnOwl::Hooks::getBuddyList->add( \&onGetBuddyList);70 $BarnOwl::Hooks::mainLoop->add("BarnOwl::Module::Jabber::onMainLoop"); 71 $BarnOwl::Hooks::getBuddyList->add("BarnOwl::Module::Jabber::onGetBuddyList"); 72 72 $vars{show} = ''; 73 73 BarnOwl::new_variable_bool("jabber:show_offline_buddies", … … 92 92 } 93 93 94 $BarnOwl::Hooks::startup->add( \&onStart);94 $BarnOwl::Hooks::startup->add("BarnOwl::Module::Jabber::onStart"); 95 95 96 96 sub onMainLoop { -
perlwrap.pm
r0f9eca7 r167044b 603 603 my $self = shift; 604 604 my @args = @_; 605 return map {$_->(@args)} @$self; 605 return map {$self->_run($_,@args)} @$self; 606 } 607 608 sub _run { 609 my $self = shift; 610 my $fn = shift; 611 my @args = @_; 612 no strict 'refs'; 613 return $fn->(@args); 606 614 } 607 615 … … 615 623 my $self = shift; 616 624 my $func = shift; 617 die("Not a coderef!") unless ref($func) eq 'CODE'; 625 die("Not a coderef!") unless ref($func) eq 'CODE' || !ref($func); 626 return if grep {$_ eq $func} @$self; 618 627 push @$self, $func; 619 628 }
Note: See TracChangeset
for help on using the changeset viewer.