r35211 - in /branches/upstream/libsane-perl/current: Changes MANIFEST META.yml Sane.xs lib/Sane.pm t/data.t t/enums.t t/err.t t/non-blocking.t t/options.t t/pod.t
ra28145-guest at users.alioth.debian.org
ra28145-guest at users.alioth.debian.org
Mon May 11 19:29:39 UTC 2009
Author: ra28145-guest
Date: Mon May 11 19:29:30 2009
New Revision: 35211
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35211
Log:
[svn-upgrade] Integrating new upstream version, libsane-perl (0.03)
Added:
branches/upstream/libsane-perl/current/t/pod.t
Modified:
branches/upstream/libsane-perl/current/Changes
branches/upstream/libsane-perl/current/MANIFEST
branches/upstream/libsane-perl/current/META.yml
branches/upstream/libsane-perl/current/Sane.xs
branches/upstream/libsane-perl/current/lib/Sane.pm
branches/upstream/libsane-perl/current/t/data.t
branches/upstream/libsane-perl/current/t/enums.t
branches/upstream/libsane-perl/current/t/err.t
branches/upstream/libsane-perl/current/t/non-blocking.t
branches/upstream/libsane-perl/current/t/options.t
Modified: branches/upstream/libsane-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/Changes?rev=35211&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/Changes (original)
+++ branches/upstream/libsane-perl/current/Changes Mon May 11 19:29:30 2009
@@ -1,4 +1,9 @@
-Revision history for Perl extension SANE.
+Revision history for Perl extension Sane.
+
+0.03 Mon, 11 May 2009 09:56:37 +0200
+ - Add Sane->get_version_scalar
+ - Don't export SANE_CAP_ALWAYS_SETTABLE unless libsane 1.0.19
+ - Add debug message for sane_open
0.02 Wed Nov 26 20:45:00 2008
- Skip most tests if we don't have libsane 1.0.19
Modified: branches/upstream/libsane-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/MANIFEST?rev=35211&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/MANIFEST (original)
+++ branches/upstream/libsane-perl/current/MANIFEST Mon May 11 19:29:30 2009
@@ -13,4 +13,5 @@
t/err.t
t/non-blocking.t
t/options.t
+t/pod.t
META.yml Module meta-data (added by MakeMaker)
Modified: branches/upstream/libsane-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/META.yml?rev=35211&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/META.yml (original)
+++ branches/upstream/libsane-perl/current/META.yml Mon May 11 19:29:30 2009
@@ -1,11 +1,11 @@
--- #YAML:1.0
name: Sane
-version: 0.02
+version: 0.03
abstract: Perl extension for the SANE (Scanner Access Now Easy) Project
license: ~
author:
- Jeffrey Ratcliffe
-generated_by: ExtUtils::MakeMaker version 6.44
+generated_by: ExtUtils::MakeMaker version 6.42
distribution_type: module
requires:
meta-spec:
Modified: branches/upstream/libsane-perl/current/Sane.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/Sane.xs?rev=35211&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/Sane.xs (original)
+++ branches/upstream/libsane-perl/current/Sane.xs Mon May 11 19:29:30 2009
@@ -369,7 +369,9 @@
newCONSTSUB(stash, "SANE_CAP_AUTOMATIC", newSViv(SANE_CAP_AUTOMATIC));
newCONSTSUB(stash, "SANE_CAP_INACTIVE", newSViv(SANE_CAP_INACTIVE));
newCONSTSUB(stash, "SANE_CAP_ADVANCED", newSViv(SANE_CAP_ADVANCED));
+#ifdef SANE_CAP_ALWAYS_SETTABLE
newCONSTSUB(stash, "SANE_CAP_ALWAYS_SETTABLE", newSViv(SANE_CAP_ALWAYS_SETTABLE));
+#endif
newCONSTSUB(stash, "SANE_INFO_INEXACT", newSViv(SANE_INFO_INEXACT));
newCONSTSUB(stash, "SANE_INFO_RELOAD_OPTIONS", newSViv(SANE_INFO_RELOAD_OPTIONS));
@@ -549,7 +551,9 @@
SANE_Handle h;
PPCODE:
status = sane_open(name, &h);
- SV* sv = get_sv("Sane::_status", FALSE);
+ SV* sv = get_sv("Sane::DEBUG", FALSE);
+ if (SvTRUE(sv)) printf("sane_open returned SANE_Handle %d\n", (int) h);
+ sv = get_sv("Sane::_status", FALSE);
sv_setiv(sv, status);
if (status) {
XPUSHs(sv_2mortal(newSV(0)));
Modified: branches/upstream/libsane-perl/current/lib/Sane.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/lib/Sane.pm?rev=35211&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/lib/Sane.pm (original)
+++ branches/upstream/libsane-perl/current/lib/Sane.pm Mon May 11 19:29:30 2009
@@ -251,7 +251,7 @@
SANE_NAME_LAMP_OFF_AT_EXIT
);
-our $VERSION = '0.02';
+our $VERSION = '0.03';
our $DEBUG = 0;
our ($STATUS, $_status, $_vc);
@@ -267,6 +267,18 @@
return undef if ($_status);
}
return Sane->_get_version($_vc);
+}
+
+
+sub get_version_scalar {
+ if (not $_vc) {
+ print "Running init\n" if $DEBUG;
+ $_vc = Sane->_init;
+ $STATUS = Sane::Status->new;
+ return undef if ($_status);
+ }
+ my @version = Sane->_get_version($_vc);
+ return $version[0]+$version[1]/1000+$version[2]/1000000;
}
@@ -412,6 +424,12 @@
join('.',Sane->get_version)
+=head2 Sane->get_version_scalar
+
+Returns an scalar with the SANE_VERSION_(MAJOR|MINOR|BUILD) versions combined
+as per the Perl version numbering, i.e. sane 1.0.19 gives 1.000019. This allows
+simple version comparisons.
+
=head2 Sane->get_devices
This function can be used to query the list of devices that are available.
Modified: branches/upstream/libsane-perl/current/t/data.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/t/data.t?rev=35211&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/t/data.t (original)
+++ branches/upstream/libsane-perl/current/t/data.t Mon May 11 19:29:30 2009
@@ -15,7 +15,8 @@
my @version = Sane->get_version;
SKIP: {
- skip "libsane 1.0.19 or better required", 18 unless $version[2] > 18;
+ skip "libsane 1.0.19 or better required", 18
+ unless Sane->get_version_scalar > 1.000018;
my $test = Sane::Device->open('test');
cmp_ok($Sane::STATUS, '==', SANE_STATUS_GOOD, 'opening test backend');
Modified: branches/upstream/libsane-perl/current/t/enums.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/t/enums.t?rev=35211&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/t/enums.t (original)
+++ branches/upstream/libsane-perl/current/t/enums.t Mon May 11 19:29:30 2009
@@ -51,7 +51,12 @@
is (SANE_CAP_AUTOMATIC, 16, "SANE_CAP_AUTOMATIC");
is (SANE_CAP_INACTIVE, 32, "SANE_CAP_INACTIVE");
is (SANE_CAP_ADVANCED, 64, "SANE_CAP_ADVANCED");
-is (SANE_CAP_ALWAYS_SETTABLE, 128, "SANE_CAP_ALWAYS_SETTABLE");
+
+SKIP: {
+ skip 'Only available in libsane 1.0.19', 1
+ unless Sane->get_version_scalar == 1.000019;
+ is (SANE_CAP_ALWAYS_SETTABLE, 128, "SANE_CAP_ALWAYS_SETTABLE");
+};
is (SANE_INFO_INEXACT, 1, "SANE_INFO_INEXACT");
is (SANE_INFO_RELOAD_OPTIONS, 2, "SANE_INFO_RELOAD_OPTIONS");
Modified: branches/upstream/libsane-perl/current/t/err.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/t/err.t?rev=35211&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/t/err.t (original)
+++ branches/upstream/libsane-perl/current/t/err.t Mon May 11 19:29:30 2009
@@ -13,9 +13,9 @@
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
-my @version = Sane->get_version;
SKIP: {
- skip "libsane 1.0.19 or better required", 37 unless $version[2] > 18;
+ skip "libsane 1.0.19 or better required", 37 unless
+ Sane->get_version_scalar > 1.000018;
my $test = Sane::Device->open('test');
cmp_ok($Sane::STATUS, '==', SANE_STATUS_GOOD, 'opening test backend');
Modified: branches/upstream/libsane-perl/current/t/non-blocking.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/t/non-blocking.t?rev=35211&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/t/non-blocking.t (original)
+++ branches/upstream/libsane-perl/current/t/non-blocking.t Mon May 11 19:29:30 2009
@@ -13,9 +13,9 @@
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
-my @version = Sane->get_version;
SKIP: {
- skip "libsane 1.0.19 or better required", 13 unless $version[2] > 18;
+ skip "libsane 1.0.19 or better required", 13
+ unless Sane->get_version_scalar > 1.000018;
my $test = Sane::Device->open('test');
cmp_ok($Sane::STATUS, '==', SANE_STATUS_GOOD, 'opening test backend');
Modified: branches/upstream/libsane-perl/current/t/options.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/t/options.t?rev=35211&op=diff
==============================================================================
--- branches/upstream/libsane-perl/current/t/options.t (original)
+++ branches/upstream/libsane-perl/current/t/options.t Mon May 11 19:29:30 2009
@@ -17,7 +17,8 @@
is ($#array, 2, 'get_version');
SKIP: {
- skip "libsane 1.0.19 or better required", 135 unless $array[2] > 18;
+ skip "libsane 1.0.19 or better required", 135
+ unless Sane->get_version_scalar > 1.000018;
@array = Sane->get_devices;
cmp_ok($Sane::STATUS, '==', SANE_STATUS_GOOD, 'get_devices');
Added: branches/upstream/libsane-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsane-perl/current/t/pod.t?rev=35211&op=file
==============================================================================
--- branches/upstream/libsane-perl/current/t/pod.t (added)
+++ branches/upstream/libsane-perl/current/t/pod.t Mon May 11 19:29:30 2009
@@ -1,0 +1,4 @@
+use Test::More;
+eval "use Test::Pod 1.00";
+plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+all_pod_files_ok();
More information about the Pkg-perl-cvs-commits
mailing list