Permalink
Browse files

import Net-Rendezvous-Publish-Backend-Avahi 0.03 from CPAN

git-cpan-module:   Net-Rendezvous-Publish-Backend-Avahi
git-cpan-version:  0.03
git-cpan-authorid: JABLKO
git-cpan-file:     authors/id/J/JA/JABLKO/Net-Rendezvous-Publish-Backend-Avahi-0.03.tar.gz
  • Loading branch information...
Jack Bates authored and schwern committed May 8, 2007
1 parent 56d010d commit 6d471ca3d99ca2e31ed5ff0ce25f077331e00a31
Showing with 69 additions and 56 deletions.
  1. +9 −4 Changes
  2. +4 −4 META.yml
  3. +12 −7 README
  4. +10 −10 SIGNATURE
  5. +34 −31 lib/Net/Rendezvous/Publish/Backend/Avahi.pm
View
13 Changes
@@ -1,12 +1,17 @@
+0.03 Sat Jun 10 21:52:36 PDT 2006
+
+ - Add to documentation.
+ - Add step function.
+
0.02 Wed Jun 7 12:07:20 PDT 2006
- Return EntryGroup objects from publish, Free EntryGroup objects in
- pbulish_stop
+ pbulish_stop.
- - Successfully convert txt string to DBus aay [Daniel Berrange]
+ - Successfully convert txt string to DBus aay, thanks Daniel Berrange.
- - Cleaned documentation a bit
+ - Clean up documentation.
0.01 Wed Jun 7 01:20:32 PDT 2006
- - Initial release
+ - Initial release.
View
@@ -1,11 +1,11 @@
---
name: Net-Rendezvous-Publish-Backend-Avahi
-version: 0.02
+version: 0.03
author:
- 'Jack Bates <ms419@freezone.co.uk>'
abstract: |-
- publish zeroconf data with the Avahi
- library
+ Publish zeroconf data with the Avahi
+ library.
license: perl
requires:
Net::DBus: 0.33.2
@@ -14,5 +14,5 @@ requires:
provides:
Net::Rendezvous::Publish::Backend::Avahi:
file: lib/Net/Rendezvous/Publish/Backend/Avahi.pm
- version: 0.02
+ version: 0.03
generated_by: Module::Build version 0.26
View
19 README
@@ -1,23 +1,28 @@
NAME
- Net::Rendezvous::Publish::Backend::Avahi - publish zeroconf data with
- the Avahi library
+ Net::Rendezvous::Publish::Backend::Avahi - Publish zeroconf data with
+ the Avahi library.
DESCRIPTION
- This module publishes zeroconf data with the Avahi library
+ This module publishes zeroconf data with the Avahi library.
- It is a backend for the Net::Rendezvous::Publish module
+ It's a backend for the Net::Rendezvous::Publish module.
+
+PREREQUISITES
+ Net::DBus
+
+ Net::Rendezvous::Publish
AUTHOR
Jack Bates <ms419@freezone.co.uk>
COPYRIGHT
- Copyright 2006, Jack Bates. All rights reserved
+ Copyright 2006, Jack Bates. All rights reserved.
This program is free software. You can redistribute it and/or modify it
- under the same terms as Perl itself
+ under the same terms as Perl itself.
SEE ALSO
- Net::Rendezvous::Publish - the module this module supports
+ Net::Rendezvous::Publish - The module this module supports.
Avahi
View
@@ -1,5 +1,5 @@
This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.54.
+signed via the Module::Signature module, version 0.55.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
@@ -15,17 +15,17 @@ not run its Makefile.PL or Build.PL.
Hash: SHA1
SHA1 300c4d62c1732ad760c1c4d4d76dd8289cc99c0c Build.PL
-SHA1 b7e78449e0adbf9e863063190429623d995b1dd8 Changes
+SHA1 38522030fc483c0851bbdf0799d23ece83635af9 Changes
SHA1 e2ec7963beb7308c35b4a332c709b95d0044b0f3 MANIFEST
-SHA1 ba78b06ea46bc01ffd87a6a6effcb2bae19e2e7b META.yml
+SHA1 35704352031b097aead62dc5e5a5f0772af0bb06 META.yml
SHA1 00e0321da83b5705ddea92ac8ce8ffcf77ff8416 Makefile.PL
-SHA1 04ea20c5eefe7cec5efc74623a804da7309a44f6 README
-SHA1 3fa50d99fb4268276e6c59c29712155e2a615ce4 lib/Net/Rendezvous/Publish/Backend/Avahi.pm
+SHA1 5ea5ef3539ab7879a2b3fadccca67e425c9a93a6 README
+SHA1 6c0b40fa4791620fb4ad2534f4298be8522c7334 lib/Net/Rendezvous/Publish/Backend/Avahi.pm
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.3 (GNU/Linux)
+Version: GnuPG v1.4.6 (GNU/Linux)
-iGUEARECACUFAkSHJd8eGGhrcDovL2NnaS5zZnUuY2E6ODAvfmpkYmF0ZXMvAAoJ
-EDQq9j8F5ZSEGGoAn2Xwzqz8MsZss77VSFJkCwMSpmrmAKCk5PFimrM2I6gcQmlU
-yel0eROxIw==
-=r+Ee
+iGUEARECACUFAkY+tW0eGGhrcDovL2NnaS5zZnUuY2E6ODAvfmpkYmF0ZXMvAAoJ
+EDQq9j8F5ZSEbQ8An2ABpg8Ca3+bU1WHsmAhFxT9IUQxAJ94fm3D+v3FQZ+Z4oFU
+6R9G3cxBJQ==
+=ls1y
-----END PGP SIGNATURE-----
@@ -7,43 +7,40 @@ use warnings;
use Net::DBus;
-our $VERSION = 0.02;
+our $VERSION = 0.03;
sub new {
my $class = shift;
-
- my $bus = Net::DBus->system();
- my $service = $bus->get_service('org.freedesktop.Avahi');
- my $server = $service->get_object('/', 'org.freedesktop.Avahi.Server');
-
- my $self = {service => $service,
- server => $server};
+ my $self = {@_};
bless $self, $class;
- return $self;
-}
+ my $bus = Net::DBus->system;
+ $self->{service} = $bus->get_service('org.freedesktop.Avahi');
+ $self->{server} = $self->{service}->get_object(
+ '/', 'org.freedesktop.Avahi.Server');
-sub DESTROY {
+ return $self;
}
sub publish {
my $self = shift;
- my %params = @_;
+ my %args = @_;
- my $group = $self->{service}->get_object($self->{server}->EntryGroupNew(),
- 'org.freedesktop.Avahi.EntryGroup');
+ my $group = $self->{service}->get_object(
+ $self->{server}->EntryGroupNew, 'org.freedesktop.Avahi.EntryGroup');
$group->AddService(Net::DBus::dbus_int32(-1), Net::DBus::dbus_int32(-1),
- Net::DBus::dbus_uint32(0), $params{name}, $params{type},
- $params{domain}, $params{host}, Net::DBus::dbus_uint16($params{port}),
+ Net::DBus::dbus_uint32(0), $args{name}, $args{type},
+ $args{domain}, $args{host}, Net::DBus::dbus_uint16($args{port}),
- # Add Service argument signature is aay. Split first into key/value
- # pairs at character \x1, then map characters to bytes & add DBus type
+ # AddService argument signature is aay. Split first into key/value
+ # pairs at character \x01, then map characters to bytes and add DBus
+ # type.
[map {
[map {
Net::DBus::dbus_byte(ord($_))
} (split //, $_)]
- } (split /\x1/, $params{txt})]);
- $group->Commit();
+ } (split /\x01/, $args{txt})]);
+ $group->Commit;
return $group;
}
@@ -52,7 +49,10 @@ sub publish_stop {
my $self = shift;
my ($group) = @_;
- $group->Free();
+ $group->Free;
+}
+
+sub step {
}
1;
@@ -61,30 +61,33 @@ __END__
=head1 NAME
-Net::Rendezvous::Publish::Backend::Avahi - publish zeroconf data with the Avahi
-library
+Net::Rendezvous::Publish::Backend::Avahi - Publish zeroconf data with the Avahi
+library.
=head1 DESCRIPTION
-This module publishes zeroconf data with the Avahi library
+This module publishes zeroconf data with the Avahi library.
+
+It's a backend for the Net::Rendezvous::Publish module.
+
+=head1 PREREQUISITES
-It is a backend for the Net::Rendezvous::Publish module
+Net::DBus
+
+Net::Rendezvous::Publish
=head1 AUTHOR
Jack Bates <ms419@freezone.co.uk>
=head1 COPYRIGHT
-Copyright 2006, Jack Bates. All rights reserved
+Copyright 2006, Jack Bates. All rights reserved.
-This program is free software. You can redistribute it and/or modify it under
-the same terms as Perl itself
+This program is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
=head1 SEE ALSO
-Net::Rendezvous::Publish - the module this module supports
+Net::Rendezvous::Publish - The module this module supports.
L<Avahi|http://avahi.org/>
-
-=cut

0 comments on commit 6d471ca

Please sign in to comment.