Bug#841737: libmodule-corelist-perl: is_core with version returns false

gregor herrmann gregoa at debian.org
Sat Oct 29 15:03:41 UTC 2016


On Sun, 23 Oct 2016 18:19:16 +0200, gregor herrmann wrote:

> - add some safeguard to its debian/rules, like in
>   libperl-apireference-perl, and/or

Proof of concept with two options. I think the last one/line looks
ok.

#v+
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,20 @@
 #!/usr/bin/make -f

+CURRENT_PERL := $(shell perl -e 'print $$]')
+
 %:
        dh $@
+
+override_dh_auto_build:
+       dh_auto_build
+       @echo Checking support for Perl $(CURRENT_PERL)
+
+       # success
+       @perl -Iblib/lib -MModule::CoreList -E '%h=Module::CoreList->find_version("5.024000") or say "Perl 5.024000 not supported by version $$Module::CoreList::VERSION of Module::CoreList"; exit !%h;'
+       # failure
+       @perl -Iblib/lib -MModule::CoreList -E '%h=Module::CoreList->find_version("$(CURRENT_PERL)") or say "Perl $(CURRENT_PERL) not supported by version $$Module::CoreList::VERSION of Module::CoreList"; exit !%h;'
+
+       # success
+       @perl -Iblib/lib -MModule::CoreList -E '$$date=$$Module::CoreList::released{"5.024000"} or say "Perl 5.024000 not supported by version $$Module::CoreList::VERSION of Module::CoreList"; exit !$$date;'
+       # failure
+       @perl -Iblib/lib -MModule::CoreList -E '$$date=$$Module::CoreList::released{"$(CURRENT_PERL)"} or say "Perl $(CURRENT_PERL) not supported by version $$Module::CoreList::VERSION of Module::CoreList"; exit !$$date;'
#v-


-- 
 .''`.  Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Donovan: La Moora
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20161029/e371bf0c/attachment.sig>


More information about the pkg-perl-maintainers mailing list