r15857 - in /trunk/libfax-hylafax-client-perl: Changes Client.pm MANIFEST Makefile.PL README debian/changelog debian/compat debian/control debian/copyright debian/rules debian/watch test.pl

tincho-guest at users.alioth.debian.org tincho-guest at users.alioth.debian.org
Thu Feb 28 12:23:39 UTC 2008


Author: tincho-guest
Date: Thu Feb 28 12:23:38 2008
New Revision: 15857

URL: http://svn.debian.org/wsvn/?sc=1&rev=15857
Log:
* New upstream release.
* debian/watch: upgraded to version 3 and dist/ URL.
* debian/rules:
- Redone from templates, there was much unneeded stuff.
- Fixed FTBFS with Perl 5.10: the empty /usr/lib/perl5 is gone (Closes:
  #468036)
* debian/control:
- Debhelper compatibility to 5.
- Set Maintainer to pkg-perl, move old maintainer to Uploaders, and add
  myself.
- Bumped Standards-Version: no changes.
- Added Homepage and Vcs-* fields.
- Improved Description.
* debian/copyright: new format and updated CP info.

Modified:
    trunk/libfax-hylafax-client-perl/Changes
    trunk/libfax-hylafax-client-perl/Client.pm
    trunk/libfax-hylafax-client-perl/MANIFEST
    trunk/libfax-hylafax-client-perl/Makefile.PL
    trunk/libfax-hylafax-client-perl/README
    trunk/libfax-hylafax-client-perl/debian/changelog
    trunk/libfax-hylafax-client-perl/debian/compat
    trunk/libfax-hylafax-client-perl/debian/control
    trunk/libfax-hylafax-client-perl/debian/copyright
    trunk/libfax-hylafax-client-perl/debian/rules
    trunk/libfax-hylafax-client-perl/debian/watch
    trunk/libfax-hylafax-client-perl/test.pl

Modified: trunk/libfax-hylafax-client-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/Changes?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/Changes (original)
+++ trunk/libfax-hylafax-client-perl/Changes Thu Feb 28 12:23:38 2008
@@ -1,9 +1,13 @@
-Revision history for Perl extension Fax::Hylafax::Client.
-
-1.00  Sub Dec 7 01:37:47 2003
-	- original version; framework created by h2xs 1.21
-
-1.01  Sat Dec 13 19:14:25 2003
-	- a number of "service" methods added
-	- global variables implemented
-	- documentation added
+Revision history for Perl extension Fax::Hylafax::Client.
+
+1.00  Sun Dec 7 01:37:47 2003 MST
+	- original version; framework created by h2xs 1.21
+
+1.01  Sat Dec 13 19:14:25 2003 MST
+	- a number of "service" methods added
+	- global variables implemented
+	- documentation added
+
+1.02  Sun Jun 25 23:42:40 2006 MDT
+	- redesigned temporary file storage (bug #5008)
+	- added ability to attach multiple source documents

Modified: trunk/libfax-hylafax-client-perl/Client.pm
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/Client.pm?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/Client.pm (original)
+++ trunk/libfax-hylafax-client-perl/Client.pm Thu Feb 28 12:23:38 2008
@@ -19,29 +19,31 @@
 our @ISA = qw(Exporter);
 our @EXPORT_OK = qw(faxinfo faxrm faxstat sendfax sendpage);
 
-our $VERSION = "1.01";
+our $VERSION = "1.02";
 
 our $Host;
 our $Port;
 our $User;
 our $Password;
 our $Passive;
+our $Debug;
 our $NotifyAddr;
 
 
-sub faxinfo {
+sub faxinfo
+{
 	shift if $_[0] eq __PACKAGE__;
 	my %param  = scalar @_ == 1 ? ('jobid', shift) : @_;
-	my $self  = {
+	my $self = {
 		TRACE	=> '',
 		SUCCESS	=> '',
 		CONTENT	=> '',
 	};
 
 	##  Set defaults
-	$param{host}		||= $Host	|| 'localhost';
-	$param{port}		||= $Port	|| '4559';
-	$param{user}		||= $User	|| 'anonymous';
+	$param{host}		||= $Host		|| 'localhost';
+	$param{port}		||= $Port		|| '4559';
+	$param{user}		||= $User		|| 'anonymous';
 	$param{password}	||= $Password	|| 'anonymous';
 	$param{passive}		||= $Passive	|| '0';
 
@@ -69,18 +71,19 @@
 }
 
 
-sub faxrm {
+sub faxrm
+{
 	shift if $_[0] eq __PACKAGE__;
 	my %param  = scalar @_ == 1 ? ('jobid', shift) : @_;
-	my $self  = {
+	my $self = {
 		TRACE	=> '',
 		SUCCESS	=> '',
 	};
 
 	##  Set defaults
-	$param{host}		||= $Host	|| 'localhost';
-	$param{port}		||= $Port	|| '4559';
-	$param{user}		||= $User	|| 'anonymous';
+	$param{host}		||= $Host		|| 'localhost';
+	$param{port}		||= $Port		|| '4559';
+	$param{user}		||= $User		|| 'anonymous';
 	$param{password}	||= $Password	|| 'anonymous';
 	$param{passive}		||= $Passive	|| '0';
 
@@ -105,19 +108,20 @@
 }
 
 
-sub faxstat {
+sub faxstat
+{
 	shift if $_[0] eq __PACKAGE__;
 	my %param  = @_;
-	my $self  = {
+	my $self = {
 		TRACE	=> '',
 		SUCCESS	=> '',
 		CONTENT	=> '',
 	};
 
 	##  Set defaults
-	$param{host}		||= $Host	|| 'localhost';
-	$param{port}		||= $Port	|| '4559';
-	$param{user}		||= $User	|| 'anonymous';
+	$param{host}		||= $Host		|| 'localhost';
+	$param{port}		||= $Port		|| '4559';
+	$param{user}		||= $User		|| 'anonymous';
 	$param{password}	||= $Password	|| 'anonymous';
 	$param{passive}		||= $Passive	|| '0';
 	$param{filefmt}		||= '';
@@ -135,9 +139,11 @@
 	$self->{TRACE} .= $client->message;
 
 	##  Process the task
-	if ($param{info}){
+	if ($param{info})
+	{
 		my $dataconn = $client->retr("status/any.info") || _com_error($client);
-		while ($dataconn->read(my $buffer, 1024)){
+		while ($dataconn->read(my $buffer, 1024))
+		{
 			$self->{CONTENT} .= $buffer;
 		}
 		$dataconn->close;
@@ -145,17 +151,20 @@
 	}
 
 	my $dataconn = $client->list("status") || _com_error($client);
-	while ($dataconn->read(my $buffer, 1024)){
+	while ($dataconn->read(my $buffer, 1024))
+	{
 		$self->{CONTENT} .= $buffer;
 	}
 	$dataconn->close;
 	$self->{TRACE} .= $client->message;
 
-	if ($param{files}){
+	if ($param{files})
+	{
 		$client->quot("filefmt", $param{filefmt}) || _com_error($client);
 		my $dataconn = $client->list("docq") || _com_error($client);
 		my $content;
-		while ($dataconn->read(my $buffer, 1024)){
+		while ($dataconn->read(my $buffer, 1024))
+		{
 			$content .= $buffer;
 		}
 		$dataconn->close;
@@ -163,11 +172,13 @@
 		$self->{TRACE} .= $client->message;
 	}
 
-	if ($param{queue}){
+	if ($param{queue})
+	{
 		$client->quot("jobfmt", $param{jobfmt}) || _com_error($client);
 		my $dataconn = $client->list("sendq") || _com_error($client);
 		my $content;
-		while ($dataconn->read(my $buffer, 1024)){
+		while ($dataconn->read(my $buffer, 1024))
+		{
 			$content .= $buffer;
 		}
 		$dataconn->close;
@@ -175,11 +186,13 @@
 		$self->{TRACE} .= $client->message;
 	}
 
-	if ($param{done}){
+	if ($param{done})
+	{
 		$client->quot("jobfmt", $param{jobfmt}) || _com_error($client);
 		my $dataconn = $client->list("doneq") || _com_error($client);
 		my $content;
-		while ($dataconn->read(my $buffer, 1024)){
+		while ($dataconn->read(my $buffer, 1024))
+		{
 			$content .= $buffer;
 		}
 		$dataconn->close;
@@ -187,11 +200,13 @@
 		$self->{TRACE} .= $client->message;
 	}
 
-	if ($param{received}){
+	if ($param{received})
+	{
 		$client->quot("rcvfmt", $param{rcvfmt}) || _com_error($client);
 		my $dataconn = $client->list("recvq") || _com_error($client);
 		my $content;
-		while ($dataconn->read(my $buffer, 1024)){
+		while ($dataconn->read(my $buffer, 1024))
+		{
 			$content .= $buffer;
 		}
 		$dataconn->close;
@@ -207,155 +222,192 @@
 }
 
 
-sub sendfax {
+sub sendfax
+{
+	shift if $_[0] eq __PACKAGE__;
+	my %param  = @_;
+	my $hostname = `hostname`; chomp $hostname;
+	my $self = {
+		JOB_ID	=> '',
+		TRACE	=> '',
+		SUCCESS	=> '',
+	};
+
+	##  Set defaults
+	$param{host}			||= $Host		|| 'localhost';
+	$param{port}			||= $Port		|| '4559';
+	$param{user}			||= $User		|| 'anonymous';
+	$param{password}		||= $Password	|| 'anonymous';
+	$param{passive}			||= $Passive	|| '0';
+	$param{debug}			||= $Debug		|| '0';
+	$param{lasttime}		||= '000259';
+	$param{maxdials}		||= '12';
+	$param{maxtries}		||= '3';
+	$param{pagewidth}		||= '216';
+	$param{pagelength}		||= '279';
+	$param{vres}			||= '196';
+	$param{schedpri}		||= '127';
+	$param{chopthreshold}	||= '3';
+	$param{notify}			||= 'none';
+	$param{notifyaddr}		||= $NotifyAddr	|| $param{'user'} . '@' . $hostname;
+	$param{sendtime}		||= 'now';
+
+	$self->{PARAM} = \%param;
+
+	##  Basic error checking
+	croak __PACKAGE__ . ": *dialstring* parameter is missing" unless $param{dialstring};
+	croak __PACKAGE__ . ": *docfile* parameter is missing" if (! $param{docfile} && ! $param{poll});
+	croak __PACKAGE__ . ": $param{coverfile} does not exist" if ($param{coverfile} && ! -e $param{coverfile});
+
+	if (ref(\$param{docfile}) eq 'SCALAR')
+	{
+		$param{docfiles} = [ $param{docfile} ];
+	}
+	elsif (ref($param{docfile}) eq 'ARRAY')
+	{
+		$param{docfiles} = $param{docfile};
+	}
+	else
+	{
+		croak __PACKAGE__ . ": *docfile* parameter must be a SCALAR or an ARRAY REFERENCE";
+	}
+
+	foreach my $docfile (@{$param{docfiles}})
+	{
+		croak __PACKAGE__ . ": $docfile does not exist" if (! -e $docfile);
+	}
+
+	delete $param{docfile};
+
+	##  Try to connect
+	my $client = Net::FTP->new($param{'host'}, Port => $param{'port'}, Passive => $param{'passive'}, Debug => $param{'debug'}) || croak __PACKAGE__ . ": " . $@;
+	$client->login($param{'user'}, $param{'password'}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+	$client->binary || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	##  Process the job
+	my @tempfiles = ();
+
+	if ($param{coverfile})
+	{
+		my $unique = time . sprintf('%05d', $$) . sprintf('%04d', int(rand 10000));
+		my $remote = '/tmp/cover.' . $hostname . '.' . $unique;
+
+		$client->put($param{coverfile}, $remote) || _com_error($client);	# (STOT would be nice, but Net::FTP doesn`t support it and STOU is broken)
+		$self->{TRACE} .= $client->message;
+
+		push (@tempfiles, $remote);
+	}
+
+	foreach my $docfile (@{$param{docfiles}})
+	{
+		my $unique = time . sprintf('%05d', $$) . sprintf('%04d', int(rand 10000));
+		my $remote = '/tmp/doc.' . $hostname . '.' . $unique;
+
+		$client->put($docfile, $remote) || _com_error($client);
+		$self->{TRACE} .= $client->message;
+
+		push (@tempfiles, $remote);
+	}
+
+	$client->quot("jnew") || _com_error($client);
+	$self->{TRACE} .= $client->message;
+	$client->message =~ /jobid: (\d+)/i;
+	$self->{JOB_ID} = $1 if $1;
+	$self->{PARAM}->{jobid} = $self->{JOB_ID};
+
+	$client->quot("jparm fromuser", $param{'user'}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm lasttime", $param{lasttime}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm maxdials", $param{maxdials}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm maxtries", $param{maxtries}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm schedpri", $param{schedpri}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm dialstring", $param{dialstring}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm sendtime", $param{sendtime}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm notifyaddr", $param{notifyaddr}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm vres", $param{vres}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm pagewidth", $param{pagewidth}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm pagelength", $param{pagelength}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm notify", $param{notify}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm pagechop", "default") || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	$client->quot("jparm chopthreshold", $param{chopthreshold}) || _com_error($client);
+	$self->{TRACE} .= $client->message;
+
+	foreach my $docfile (@tempfiles)
+	{
+		if ($param{coverfile} && $docfile eq $tempfiles[0])
+		{
+			$client->quot("jparm cover", $docfile) or _com_error($client);
+		}
+		else
+		{
+			$client->quot("jparm document", $docfile) or _com_error($client);
+		}
+
+		$self->{TRACE} .= $client->message;
+	}
+
+	if (defined $param{poll})
+	{
+		my ($selector, $passwd) = split(" ", $param{poll});
+		$client->quot("jparm poll", $selector || "", $passwd || "") || _com_error($client);
+		$self->{TRACE} .= $client->message;
+	}
+
+	$client->quot("jsubm") || _com_error($client);
+	$self->{TRACE} .= $client->message;
+	$self->{SUCCESS} = $client->message =~ /failed/i || $client->message =~ /failed/i? 0 : 1;
+
+	##  Disconnect
+	$client->quit;
+	$self->{TRACE} .= $client->message;
+
+	return bless $self, __PACKAGE__ . "::Queued";
+}
+
+
+sub sendpage
+{
 	shift if $_[0] eq __PACKAGE__;
 	my %param  = @_;
 	my $hostname = `hostname`; chomp $hostname;
 	my $unique = time . $$ . int(rand 10000);
-	my $self  = {
+	my $self = {
 		JOB_ID	=> '',
 		TRACE	=> '',
 		SUCCESS	=> '',
 	};
 
 	##  Set defaults
-	$param{host}		||= $Host	|| 'localhost';
-	$param{port}		||= $Port	|| '4559';
-	$param{user}		||= $User	|| 'anonymous';
-	$param{password}	||= $Password	|| 'anonymous';
-	$param{passive}		||= $Passive	|| '0';
-	$param{lasttime}	||= '000259';
-	$param{maxdials}	||= '12';
-	$param{maxtries}	||= '3';
-	$param{pagewidth}	||= '216';
-	$param{pagelength}	||= '279';
-	$param{vres}		||= '196';
-	$param{schedpri}	||= '127';
-	$param{chopthreshold}	||= '3';
-	$param{notify}		||= 'none';
-	$param{notifyaddr}	||= $NotifyAddr	|| $param{'user'} . '@' . $hostname;
-	$param{sendtime}	||= 'now';
-
-	$self->{PARAM} = \%param;
-
-	##  Basic error checking
-	croak __PACKAGE__ . ": *dialstring* parameter is missing" unless $param{dialstring};
-	croak __PACKAGE__ . ": *docfile* parameter is missing" if (! $param{docfile} && ! $param{poll});
-	croak __PACKAGE__ . ": $param{docfile} does not exist" if ($param{docfile} && ! -e $param{docfile});
-	croak __PACKAGE__ . ": $param{coverfile} does not exist" if ($param{coverfile} && ! -e $param{coverfile});
-
-	##  Try to connect
-	my $client = Net::FTP->new($param{'host'}, Port => $param{'port'}, Passive => $param{'passive'}) || croak __PACKAGE__ . ": " . $@;
-	$client->login($param{'user'}, $param{'password'}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-	$client->binary || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	##  Process the job
-	my $remote_cover = "/tmp/$hostname.$unique.cover";
-	my $remote_document = "/tmp/$hostname.$unique.document";
-
-	if ($param{coverfile}){
-		$client->put($param{coverfile}, $remote_cover) || _com_error($client);
-		$self->{TRACE} .= $client->message;
-	}
-
-	if ($param{docfile}){
-		$client->put($param{docfile}, $remote_document) || _com_error($client);
-		$self->{TRACE} .= $client->message;
-	}
-
-	$client->quot("jnew") || _com_error($client);
-	$self->{TRACE} .= $client->message;
-	$client->message =~ /jobid: (\d+)/i;
-	$self->{JOB_ID} = $1 if $1;
-	$self->{PARAM}->{jobid} = $self->{JOB_ID};
-
-	$client->quot("jparm fromuser", $param{'user'}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm lasttime", $param{lasttime}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm maxdials", $param{maxdials}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm maxtries", $param{maxtries}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm schedpri", $param{schedpri}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm dialstring", $param{dialstring}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm sendtime", $param{sendtime}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm notifyaddr", $param{notifyaddr}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm vres", $param{vres}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm pagewidth", $param{pagewidth}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm pagelength", $param{pagelength}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm notify", $param{notify}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm pagechop", "default") || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	$client->quot("jparm chopthreshold", $param{chopthreshold}) || _com_error($client);
-	$self->{TRACE} .= $client->message;
-
-	if ($param{coverfile}){
-		$client->quot("jparm cover", $remote_cover) || _com_error($client);
-		$self->{TRACE} .= $client->message;
-	}
-
-	if ($param{docfile}){
-		$client->quot("jparm document", $remote_document) || _com_error($client);
-		$self->{TRACE} .= $client->message;
-	}
-
-	if (defined $param{poll}){
-		my ($selector, $passwd) = split(" ", $param{poll});
-		$client->quot("jparm poll", $selector || "", $passwd || "") || _com_error($client);
-		$self->{TRACE} .= $client->message;
-	}
-
-	$client->quot("jsubm") || _com_error($client);
-	$self->{TRACE} .= $client->message;
-	$self->{SUCCESS} = $client->message =~ /failed/i || $client->message =~ /failed/i? 0 : 1;
-
-	##  Disconnect
-	$client->quit;
-	$self->{TRACE} .= $client->message;
-
-	return bless $self, __PACKAGE__ . "::Queued";
-}
-
-
-sub sendpage {
-	shift if $_[0] eq __PACKAGE__;
-	my %param  = @_;
-	my $hostname = `hostname`; chomp $hostname;
-	my $unique = time . $$ . int(rand 10000);
-	my $self  = {
-		JOB_ID	=> '',
-		TRACE	=> '',
-		SUCCESS	=> '',
-	};
-
-	##  Set defaults
-	$param{host}		||= $Host	|| 'localhost';
-	$param{port}		||= $Port	|| '444';
-	$param{user}		||= $User	|| 'anonymous';
+	$param{host}		||= $Host		|| 'localhost';
+	$param{port}		||= $Port		|| '444';
+	$param{user}		||= $User		|| 'anonymous';
 	$param{password}	||= $Password	|| 'anonymous';
 	$param{passive}		||= $Passive	|| '0';
 	$param{maxdials}	||= '12';
@@ -405,7 +457,8 @@
 	$self->{JOB_ID} = $1 if $1;
 	$self->{PARAM}->{jobid} = $self->{JOB_ID};
 
-	if ($param{message}){
+	if ($param{message})
+	{
 		$client->quot("mess", $param{message}) || _com_error($client);
 		$self->{TRACE} .= $client->message;
 	}
@@ -423,27 +476,31 @@
 
 ######################################################################
 
-sub _com_error {
+sub _com_error
+{
 	my $client = shift;
-	croak __PACKAGE__ . ": Cummunication error: " . $client->message;
-}
-
-
-sub _content {
+	croak __PACKAGE__ . ": Communication error: " . $client->message;
+}
+
+
+sub _content
+{
 	my $class = shift;
 	my $self = shift;
 	return $self->{CONTENT} || undef;
 }
 
 
-sub _success {
+sub _success
+{
 	my $class = shift;
 	my $self = shift;
 	return $self->{SUCCESS} || undef;
 }
 
 
-sub _trace {
+sub _trace
+{
 	my $class = shift;
 	my $self = shift;
 	return $self->{TRACE} || undef;
@@ -454,7 +511,8 @@
 package Fax::Hylafax::Client::Queued;
 
 
-sub faxinfo {
+sub faxinfo
+{
 	my $self = shift;
 	my $conn = Fax::Hylafax::Client->faxinfo(%{$self->{PARAM}});
 	$self->{TRACE} = $conn->trace;
@@ -463,7 +521,8 @@
 }
 
 
-sub faxrm {
+sub faxrm
+{
 	my $self = shift;
 	my $conn = Fax::Hylafax::Client->faxrm(%{$self->{PARAM}});
 	$self->{TRACE} = $conn->trace;
@@ -472,18 +531,21 @@
 }
 
 
-sub jobid {
+sub jobid
+{
 	my $self = shift;
 	return $self->{JOB_ID};
 }
 
 
-sub success {
+sub success
+{
 	return Fax::Hylafax::Client->_success(shift);
 }
 
 
-sub trace {
+sub trace
+{
 	return Fax::Hylafax::Client->_trace(shift);
 }
 
@@ -492,17 +554,20 @@
 package Fax::Hylafax::Client::Instant;
 
 
-sub content {
+sub content
+{
 	return Fax::Hylafax::Client->_content(shift);
 }
 
 
-sub success {
+sub success
+{
 	return Fax::Hylafax::Client->_success(shift);
 }
 
 
-sub trace {
+sub trace
+{
 	return Fax::Hylafax::Client->_trace(shift);
 }
 
@@ -528,7 +593,7 @@
 =head1 DESCRIPTION
 
 This is a simple Perl client for HylaFAX fax server (www.hylafax.org). It communicates
-with the server directly through FTP protocol and thus does not require any HylaFAX 
+with the server directly through FTP-like protocol and thus does not require any HylaFAX
 software components to be installed on the client machine.
 
 =head1 MAIN METHODS AND ATTRIBUTES
@@ -564,13 +629,15 @@
 
 =item docfile
 
-Full pathname of the main (document) file. Document file must be in one of the
+Full pathname of the document file. This attribute takes a single filename (scalar)
+or a reference to an array of filenames. Document files must be in one of the
 native HylaFAX formats, i.e. Plain Text, PostScript, TIFF Class F, or PDF.
 [REQUIRED unless you use "poll" option]
 
 =item coverfile
 
-Full pathname of the cover page file. All notes about "docfile" apply. [OPTIONAL]
+Full pathname of the cover page file. All notes about "docfile" apply, except
+it only takes one filename as scalar. [OPTIONAL]
 
 =item notifyaddr
 
@@ -892,9 +959,12 @@
           notifyaddr    => 'test at user.com',
      );
 
-     if ($fax->success){
+     if ($fax->success)
+     {
           print "We are OK";
-     } else {
+     }
+     else
+     {
           print $fax->trace;
      }
 
@@ -909,7 +979,10 @@
 
      my $fax = sendfax(
           dialstring    => '14151234567',
-          docfile       => '/usr/home/test/document.ps',
+          docfile       => [
+                              '/usr/home/test/document1.ps',
+                              '/usr/home/test/document2.ps',
+                           ],
      );
 
      my $task_succeded = $fax->success ? "YES" : "NO";
@@ -918,7 +991,8 @@
      my $current_job_status = $fax->faxinfo;
 
      my $server_stats = faxstat( info => 1, active => 1 )->content;
-     if (faxinfo($job_id)->content ne 'DONE'){
+     if (faxinfo($job_id)->content ne 'DONE')
+     {
           print "We're not done yet";
 
           $fax->faxrm;
@@ -939,9 +1013,12 @@
      }
 
      my $other_server_task = faxstats( host => 'other.server.host', user => 'bob', password => 'whatever' );
-     if ($other_server_task->success){
+     if ($other_server_task->success)
+     {
           print $other_server_task->content;
-     } else {
+     }
+     else
+     {
           print "Doh! We failed to get stats from the server: ", $other_server_task->trace;
      }
 
@@ -958,14 +1035,14 @@
 
 =head1 COPYRIGHT
 
-Copyright (c) 2003 Alex Rak.  All rights reserved.
+Copyright (c) 2003,2006 Alex Rak.  All rights reserved.
 
 This program is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself.
 
 =head1 SEE ALSO
 
-HylaFAX man pages L<http://www.hylafax.org/man/>
+HylaFAX man pages L<http://www.hylafax.org/>
 
 =cut
 

Modified: trunk/libfax-hylafax-client-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/MANIFEST?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/MANIFEST (original)
+++ trunk/libfax-hylafax-client-perl/MANIFEST Thu Feb 28 12:23:38 2008
@@ -1,7 +1,7 @@
-Changes
-Client.pm
-Makefile.PL
-MANIFEST
-README
-test.pl
-test.ps
+Changes
+Client.pm
+Makefile.PL
+MANIFEST
+README
+test.pl
+test.ps

Modified: trunk/libfax-hylafax-client-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/Makefile.PL?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/Makefile.PL (original)
+++ trunk/libfax-hylafax-client-perl/Makefile.PL Thu Feb 28 12:23:38 2008
@@ -1,10 +1,8 @@
 use ExtUtils::MakeMaker;
 
 WriteMakefile(
-    'NAME'		=> 'Fax::Hylafax::Client',
-    'VERSION_FROM'	=> 'Client.pm',
-    'PREREQ_PM'	=> { 'Net::FTP' => 2.65 },
-    ($] >= 5.005 ?
-      (ABSTRACT_FROM	=> 'Client.pm',
-       AUTHOR			=> 'Alex Rak <arak at cpan.org>') : ()),
+	'NAME'		=> 'Fax::Hylafax::Client',
+	'VERSION_FROM'	=> 'Client.pm',
+	'PREREQ_PM'	=> { 'Net::FTP' => 2.65 },
+	($] >= 5.005 ? (ABSTRACT_FROM => 'Client.pm', AUTHOR => 'Alex Rak <arak at cpan.org>') : ()),
 );

Modified: trunk/libfax-hylafax-client-perl/README
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/README?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/README (original)
+++ trunk/libfax-hylafax-client-perl/README Thu Feb 28 12:23:38 2008
@@ -1,31 +1,31 @@
-Fax::Hylafax::Client version 1.01
-=================================
-
-This is a simple Perl client for HylaFAX fax server (www.hylafax.org). 
-It communicates with the server directly through FTP protocol and 
-thus does not require any HylaFAX software components to be installed 
-on the client machine.
-
-INSTALLATION
-
-To install this module type the following:
-
-   perl Makefile.PL
-   make
-   make test
-   make install
-
-
-DEPENDENCIES
-
-This module requires these other modules and libraries:
-
-  Net::FTP 2.65 or higher
-
-
-COPYRIGHT AND LICENCE
-
-Copyright (c) 2003 Alex Rak (arak at cpan.org).  All rights reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+Fax::Hylafax::Client version 1.02
+=================================
+
+This is a simple Perl client for HylaFAX fax server (www.hylafax.org). 
+It communicates with the server directly through FTP-like protocol and 
+thus does not require any HylaFAX software components to be installed 
+on the client machine.
+
+INSTALLATION
+
+To install this module type the following:
+
+   perl Makefile.PL
+   make
+   make test
+   make install
+
+
+DEPENDENCIES
+
+This module requires these other modules and libraries:
+
+  Net::FTP 2.65 or higher
+
+
+COPYRIGHT AND LICENCE
+
+Copyright (c) 2003,2006 Alex Rak (arak at cpan.org).  All rights reserved.
+
+This program is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.

Modified: trunk/libfax-hylafax-client-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/debian/changelog?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/debian/changelog (original)
+++ trunk/libfax-hylafax-client-perl/debian/changelog Thu Feb 28 12:23:38 2008
@@ -1,3 +1,22 @@
+libfax-hylafax-client-perl (1.02-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+  * debian/watch: upgraded to version 3 and dist/ URL.
+  * debian/rules:
+  - Redone from templates, there was much unneeded stuff.
+  - Fixed FTBFS with Perl 5.10: the empty /usr/lib/perl5 is gone (Closes:
+    #468036)
+  * debian/control:
+  - Debhelper compatibility to 5.
+  - Set Maintainer to pkg-perl, move old maintainer to Uploaders, and add
+    myself.
+  - Bumped Standards-Version: no changes.
+  - Added Homepage and Vcs-* fields.
+  - Improved Description.
+  * debian/copyright: new format and updated CP info.
+
+ -- Martín Ferrari <martin.ferrari at gmail.com>  Thu, 28 Feb 2008 09:58:25 -0200
+
 libfax-hylafax-client-perl (1.01-1) unstable; urgency=low
 
   * Initial Release (closes: Bug#300986).

Modified: trunk/libfax-hylafax-client-perl/debian/compat
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/debian/compat?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/debian/compat (original)
+++ trunk/libfax-hylafax-client-perl/debian/compat Thu Feb 28 12:23:38 2008
@@ -1,1 +1,1 @@
-4
+5

Modified: trunk/libfax-hylafax-client-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/debian/control?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/debian/control (original)
+++ trunk/libfax-hylafax-client-perl/debian/control Thu Feb 28 12:23:38 2008
@@ -1,15 +1,23 @@
 Source: libfax-hylafax-client-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 4.0.2)
+Build-Depends: debhelper (>= 5)
 Build-Depends-Indep: perl
-Maintainer: Ivan Kohler <ivan-debian at 420.am>
-Standards-Version: 3.6.1
+Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
+Uploaders: Ivan Kohler <ivan-debian at 420.am>,
+ Martín Ferrari <martin.ferrari at gmail.com>
+Standards-Version: 3.7.3
+Homepage: http://search.cpan.org/dist/Fax-Hylafax-Client/
+Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libfax-hylafax-client-perl/
+Vcs-Browser: 
+ http://svn.debian.org/wsvn/pkg-perl/trunk/libfax-hylafax-client-perl/
 
 Package: libfax-hylafax-client-perl
 Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}, perl-modules (>= 5.8) | libnet-perl (>= 1.12)
-Description: Simple Perl client for HylaFAX fax server
- This is a simple Perl client for HylaFAX fax server (www.hylafax.org).  It
- communicates with the server directly through FTP protocol and thus does not
- require any HylaFAX software components to be installed on the client machine.
+Depends: ${perl:Depends}, ${misc:Depends}, perl-modules (>= 5.8) |
+ libnet-perl (>= 1.12)
+Description: simple Perl client for HylaFAX fax server
+ Fax::Hylafax::Client is a simple Perl client for HylaFAX fax server
+ (www.hylafax.org).  It communicates with the server directly through FTP
+ protocol and thus does not require any HylaFAX software components to be
+ installed on the client machine.

Modified: trunk/libfax-hylafax-client-perl/debian/copyright
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/debian/copyright?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/debian/copyright (original)
+++ trunk/libfax-hylafax-client-perl/debian/copyright Thu Feb 28 12:23:38 2008
@@ -1,14 +1,21 @@
 This is the debian package for the Fax::Hylafax::Client module.
 It was created by Ivan Kohler <ivan-debian at 420.am> using dh-make-perl.
 
-
 The upstream author is: Alex Rak <arak at cpan.org>
 
+Files: *
+Copyright: © 2003,2006 Alex Rak (arak at cpan.org).  All rights reserved.
+License: Artistic | GPL-1+
+ This program is free software; you can redistribute it and/or modify it under
+ the same terms as Perl itself.
 
-Copyright (c) 2003 Alex Rak.  All rights reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+Files: debian/*
+Copyright: © 2008 Debian Perl Group
+                  <pkg-perl-maintainers at lists.alioth.debian.org>
+           © 2005 Ivan Kohler <ivan-debian at 420.am>
+License: Other
+ It is assumed that the previous maintainer did choose a license compatible
+ with the software.
 
 Perl is distributed under your choice of the GNU General Public License or
 the Artistic License.  On Debian GNU/Linux systems, the complete text of the

Modified: trunk/libfax-hylafax-client-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/debian/rules?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/debian/rules (original)
+++ trunk/libfax-hylafax-client-perl/debian/rules Thu Feb 28 12:23:38 2008
@@ -1,8 +1,4 @@
 #!/usr/bin/make -f
-# This debian/rules file is provided as a template for normal perl
-# packages. It was created by Marc Brockschmidt <marc at dch-faq.de> for
-# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
-# be used freely wherever it is useful.
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -11,22 +7,9 @@
 # always return the default without waiting for user input.
 export PERL_MM_USE_DEFAULT=1
 
-PACKAGE=$(shell dh_listpackages)
-
-ifndef PERL
-PERL = /usr/bin/perl
-endif
-
-TMP     =$(CURDIR)/debian/$(PACKAGE)
-
-# Allow disabling build optimation by setting noopt in
-# $DEB_BUILD_OPTIONS
-CFLAGS = -Wall -g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-        CFLAGS += -O0
-else
-        CFLAGS += -O2
-endif
+PACKAGE = $(shell dh_listpackages)
+PERL   ?= /usr/bin/perl
+TMP     = $(CURDIR)/debian/$(PACKAGE)
 
 build: build-stamp
 build-stamp:
@@ -34,49 +17,37 @@
 
 	# Add commands to compile the package here
 	$(PERL) Makefile.PL INSTALLDIRS=vendor
-	$(MAKE) OPTIMIZE="$(CFLAGS)"
-	
-	touch build-stamp
+	$(MAKE)
+	$(MAKE) test
+	touch $@
 
 clean:
 	dh_testdir
 	dh_testroot
-
+	dh_clean build-stamp install-stamp
 	# Add commands to clean up after the build process here
-	-$(MAKE) distclean
-	
-	dh_clean build-stamp install-stamp
+	[ ! -f Makefile ] || $(MAKE) realclean
 
 install: install-stamp
 install-stamp: build-stamp
 	dh_testdir
 	dh_testroot
 	dh_clean -k
-
-	#$(MAKE) test
-	#$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
-	$(MAKE) install PREFIX=$(TMP)/usr
-	
-	# As this is a architecture independent package, we are not supposed to install
-	# stuff to /usr/lib. MakeMaker creates the dirs, we delete them from the deb:
-	rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5
-
-	touch install-stamp
+	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
+	[ ! -d $(TMP)/usr/lib/perl5 ] || \
+		rmdir --ignore-fail-on-non-empty --parents --verbose \
+		$(TMP)/usr/lib/perl5
+	touch $@
 
 binary-arch:
-# We have nothing to do by default.
+# We have nothing to do here for an architecture-independent package
 
 binary-indep: build install
 	dh_testdir
 	dh_testroot
-#	dh_installcron
-#	dh_installmenu
-#	dh_installexamples
 	dh_installdocs README
 	dh_installchangelogs Changes
 	dh_perl
-	dh_link
-	dh_strip
 	dh_compress
 	dh_fixperms
 	dh_installdeb
@@ -84,7 +55,7 @@
 	dh_md5sums
 	dh_builddeb
 
-source diff:                                                                  
+source diff:
 	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
 
 binary: binary-indep binary-arch

Modified: trunk/libfax-hylafax-client-perl/debian/watch
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/debian/watch?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/debian/watch (original)
+++ trunk/libfax-hylafax-client-perl/debian/watch Thu Feb 28 12:23:38 2008
@@ -1,7 +1,4 @@
-# watch control file for uscan
-# you can run the "uscan" command
-# to check for upstream updates and more.
-# Site          Directory               Pattern                 Version Script
-version=2
-ftp://ftp.cpan.org/pub/CPAN/modules/by-module/Fax/Fax-Hylafax-Client-([\d\.]+)\.tar\.gz \
-  debian uupdate
+version=3
+
+http://search.cpan.org/dist/Fax-Hylafax-Client/ \
+	.*/Fax-Hylafax-Client-v?(\d[\d.]*)\.tar\.gz

Modified: trunk/libfax-hylafax-client-perl/test.pl
URL: http://svn.debian.org/wsvn/trunk/libfax-hylafax-client-perl/test.pl?rev=15857&op=diff
==============================================================================
--- trunk/libfax-hylafax-client-perl/test.pl (original)
+++ trunk/libfax-hylafax-client-perl/test.pl Thu Feb 28 12:23:38 2008
@@ -43,6 +43,8 @@
 
 	my $fax = Fax::Hylafax::Client->sendfax(
 		host		=> $hostname || '',
+		user		=> $user || '',
+		password	=> $password || '',
 		dialstring	=> $dialstring || '',
 		docfile		=> $docfile || '',
 		notifyaddr	=> $notifyaddr || '',




More information about the Pkg-perl-cvs-commits mailing list