Changeset f421190
- Timestamp:
- Mar 14, 2012, 12:57:21 PM (12 years ago)
- Children:
- 5832433
- Parents:
- d474ee9
- git-author:
- David Benjamin <davidben@mit.edu> (03/13/12 14:05:14)
- git-committer:
- David Benjamin <davidben@mit.edu> (03/14/12 12:57:21)
- Location:
- perl/modules/Jabber/lib/BarnOwl/Module
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm
rd474ee9 rf421190 16 16 use BarnOwl; 17 17 use BarnOwl::Hooks; 18 use BarnOwl::Module::Jabber::Impl;19 18 20 19 use utf8; 21 20 22 21 our $VERSION = 0.1; 22 23 our $impl_loaded; 24 $impl_loaded = 0 unless defined($impl_loaded); 25 26 sub _load_impl { 27 unless ($impl_loaded) { 28 BarnOwl::debug("_load_impl"); 29 require BarnOwl::Module::Jabber::Impl; 30 $impl_loaded = 1; 31 BarnOwl::Module::Jabber::Impl::onStart(); 32 } 33 } 23 34 24 35 sub onStart { … … 51 62 }); 52 63 53 BarnOwl::Module::Jabber::Impl::onStart(); 64 # If we're called as part of module reload, let Impl's reload 65 # code run too. 66 if ($impl_loaded) { 67 BarnOwl::Module::Jabber::Impl::onStart(); 68 } 54 69 } else { 55 70 # Our owl doesn't support queue_message. Unfortunately, this … … 64 79 my $func = shift; 65 80 return sub { 81 _load_impl(); 66 82 no strict 'refs'; 67 83 &{"BarnOwl::Module::Jabber::Impl::$func"}; -
perl/modules/Jabber/lib/BarnOwl/Module/Jabber/Impl.pm
rd474ee9 rf421190 45 45 46 46 no warnings 'redefine'; 47 48 BarnOwl::debug("BarnOwl::Module::Jabber::Impl loaded"); 47 49 48 50 ################################################################################
Note: See TracChangeset
for help on using the changeset viewer.