home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / lib / perl5 / Net / DBus / Binding / Watch.pm < prev   
Encoding:
Perl POD Document  |  2006-06-03  |  1.7 KB  |  77 lines

  1. # -*- perl -*-
  2. #
  3. # Copyright (C) 2004-2005 Daniel P. Berrange
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18. #
  19. # $Id: Watch.pm,v 1.3 2006/01/27 15:34:24 dan Exp $
  20.  
  21. =pod
  22.  
  23. =head1 NAME
  24.  
  25. Net::DBus::Binding::Watch - binding to the dbus watch API
  26.  
  27. =cut
  28.  
  29. package Net::DBus::Binding::Watch;
  30.  
  31. use 5.006;
  32. use strict;
  33. use warnings;
  34. use Carp;
  35.  
  36. use Net::DBus;
  37.  
  38. sub AUTOLOAD {
  39.     # This AUTOLOAD is used to 'autoload' constants from the constant()
  40.     # XS function.
  41.  
  42.     my $constname;
  43.     our $AUTOLOAD;
  44.     ($constname = $AUTOLOAD) =~ s/.*:://;
  45.  
  46.     croak "&Net::DBus::Binding::Watch::constant not defined" if $constname eq '_constant';
  47.  
  48.     if (!exists $Net::DBus::Binding::Watch::_constants{$constname}) {
  49.         croak "no such constant \$Net::DBus::Binding::Watch::$constname";
  50.     }
  51.  
  52.     {
  53.     no strict 'refs';
  54.     *$AUTOLOAD = sub { $Net::DBus::Binding::Watch::_constants{$constname} };
  55.     }
  56.     goto &$AUTOLOAD;
  57. }
  58.  
  59. 1;
  60.  
  61. =pod
  62.  
  63. =head1 AUTHOR
  64.  
  65. Daniel P. Berrange.
  66.  
  67. =head1 COPYRIGHT
  68.  
  69. Copyright (C) 2004-2006 Daniel P. Berrange
  70.  
  71. =head1 SEE ALSO
  72.  
  73. L<Net::DBus::Binding::Connection>
  74.  
  75. =cut
  76.  
  77.