[SCM] Debian packaging of DBIx-Profile CPAN distribution branch, master, updated. debian/1.0-3-8-g200ee6a

Xavier x.guimard at free.fr
Sun Dec 23 18:23:17 UTC 2012


The following commit has been merged in the master branch:
commit b19e511c6c26b33f99e509e64f0ba0656a9fb063
Author: Xavier <x.guimard at free.fr>
Date:   Sun Dec 23 19:04:29 2012 +0100

    Transform old package.diff in patch

diff --git a/MANIFEST b/MANIFEST
deleted file mode 100644
index f68882b..0000000
--- a/MANIFEST
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile.PL
-Profile.pm
-README
-MANIFEST
diff --git a/Profile.pm b/Profile.pm
index 47ca35c..13f9d37 100644
--- a/Profile.pm
+++ b/Profile.pm
@@ -64,10 +64,10 @@
   DBIx::Profile is a quick and easy, and mostly transparent, profiler
   for scripts using DBI.  It collects information on the query 
   level, and keeps track of first, failed, normal, and total amounts
-  (count, wall clock, CPU time) for each function on the query.
+  (count, wall clock, cput time) for each function on the query.
 
   NOTE: DBIx::Profile use Time::HiRes to clock the wall time and
-  the old standby times() to clock the CPU time.  The CPU time is
+  the old standby times() to clock the cpu time.  The cpu time is
   pretty coarse.
 
   DBIx::Profile can also trace the execution of queries.  It will print 
@@ -225,16 +225,9 @@ sub DESTROY {
 # JEFF - The printing and the print code is kinda (er... very) ugly!
 #
 
-#like printProfile, except returns the results instead of printing them.
-sub sprintProfile {
-    my $self = shift;
-    $self->printProfile({'sprint'=>1});
-}
-
 sub printProfile {
 
     my $self = shift;
-    my $args = shift;
     my %result;
     my $total = 0;
     no integer;
@@ -299,18 +292,13 @@ sub printProfile {
 	$result{$total} = $text;
     } # each query
 
-    my $results;
     foreach my $qry (sort stripsort keys %result) {
-        if ( $args->{'sprint'} ) {
-            $results .= $result{$qry} . "\n";
-        } elsif ($DBIx::Profile::DBIXFILE eq "" ) {
+	if ($DBIx::Profile::DBIXFILE eq "" ) {
 	    warn $result{$qry} . "\n";
 	} else {
 	    print $DBIx::Profile::DBIXFILEHANDLE $result{$qry} . "\n";
 	}
     }
-
-    return $results if $args->{'sprint'};
 }
     
 sub stripsort {
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..75512c5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+update-old-patch-to-quilt-format
diff --git a/debian/patches/update-old-patch-to-quilt-format b/debian/patches/update-old-patch-to-quilt-format
new file mode 100644
index 0000000..20350e4
--- /dev/null
+++ b/debian/patches/update-old-patch-to-quilt-format
@@ -0,0 +1,65 @@
+Description: Update old patch to quilt format
+Author: Ivan Kohler <ivan at debian.org>
+Forwarded: no
+Reviewed-By: Xavier Guimard <x.guimard at free.fr>
+Last-Update: 2012-12-23
+
+--- /dev/null
++++ b/MANIFEST
+@@ -0,0 +1,4 @@
++Makefile.PL
++Profile.pm
++README
++MANIFEST
+--- a/Profile.pm
++++ b/Profile.pm
+@@ -64,10 +64,10 @@
+   DBIx::Profile is a quick and easy, and mostly transparent, profiler
+   for scripts using DBI.  It collects information on the query 
+   level, and keeps track of first, failed, normal, and total amounts
+-  (count, wall clock, cput time) for each function on the query.
++  (count, wall clock, CPU time) for each function on the query.
+ 
+   NOTE: DBIx::Profile use Time::HiRes to clock the wall time and
+-  the old standby times() to clock the cpu time.  The cpu time is
++  the old standby times() to clock the CPU time.  The CPU time is
+   pretty coarse.
+ 
+   DBIx::Profile can also trace the execution of queries.  It will print 
+@@ -225,9 +225,16 @@
+ # JEFF - The printing and the print code is kinda (er... very) ugly!
+ #
+ 
++#like printProfile, except returns the results instead of printing them.
++sub sprintProfile {
++    my $self = shift;
++    $self->printProfile({'sprint'=>1});
++}
++
+ sub printProfile {
+ 
+     my $self = shift;
++    my $args = shift;
+     my %result;
+     my $total = 0;
+     no integer;
+@@ -292,13 +299,18 @@
+ 	$result{$total} = $text;
+     } # each query
+ 
++    my $results;
+     foreach my $qry (sort stripsort keys %result) {
+-	if ($DBIx::Profile::DBIXFILE eq "" ) {
++        if ( $args->{'sprint'} ) {
++            $results .= $result{$qry} . "\n";
++        } elsif ($DBIx::Profile::DBIXFILE eq "" ) {
+ 	    warn $result{$qry} . "\n";
+ 	} else {
+ 	    print $DBIx::Profile::DBIXFILEHANDLE $result{$qry} . "\n";
+ 	}
+     }
++
++    return $results if $args->{'sprint'};
+ }
+     
+ sub stripsort {

-- 
Debian packaging of DBIx-Profile CPAN distribution



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