r26312 - in /trunk/libtest-without-module-perl: Changes META.yml debian/changelog debian/compat debian/control debian/copyright debian/rules lib/Test/Without/Module.pm

rmayorga-guest at users.alioth.debian.org rmayorga-guest at users.alioth.debian.org
Tue Oct 28 20:56:07 UTC 2008


Author: rmayorga-guest
Date: Tue Oct 28 20:55:58 2008
New Revision: 26312

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=26312
Log:
* New upstream release
* debian/control 
  + set dephelper and compat level to 7
  + add myself to uploaders
  + set Standards-Version to 3.8.0 ( no changes needed )
  + mention module name at long description
  + add libfile-slurp-perl to B-D-I, this will enable one more test
* debian/rules - refresh using dh-make-perl templates
* debian/copyright - use (new)format

Modified:
    trunk/libtest-without-module-perl/Changes
    trunk/libtest-without-module-perl/META.yml
    trunk/libtest-without-module-perl/debian/changelog
    trunk/libtest-without-module-perl/debian/compat
    trunk/libtest-without-module-perl/debian/control
    trunk/libtest-without-module-perl/debian/copyright
    trunk/libtest-without-module-perl/debian/rules
    trunk/libtest-without-module-perl/lib/Test/Without/Module.pm

Modified: trunk/libtest-without-module-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-without-module-perl/Changes?rev=26312&op=diff
==============================================================================
--- trunk/libtest-without-module-perl/Changes (original)
+++ trunk/libtest-without-module-perl/Changes Tue Oct 28 20:55:58 2008
@@ -2,6 +2,11 @@
 
 Todo:
   - Add way to allow only core modules (suggested by SREZIC)
+
+0.16 20081020
+  - Add a test that exhibits the "redefined" warnings upon disallowing
+    and then reallowing a module
+  - Fixed the code so no more warnings get issued. [RT#40065]
 
 0.15 20071021
   - Now really restored compatibility of the tests with Perl 5.005,

Modified: trunk/libtest-without-module-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-without-module-perl/META.yml?rev=26312&op=diff
==============================================================================
--- trunk/libtest-without-module-perl/META.yml (original)
+++ trunk/libtest-without-module-perl/META.yml Tue Oct 28 20:55:58 2008
@@ -1,13 +1,13 @@
 --- #YAML:1.0
 name:                Test-Without-Module
-version:             0.15
+version:             0.16
 abstract:            Test fallback behaviour in absence of modules
 license:             ~
-generated_by:        ExtUtils::MakeMaker version 6.36_01
+author:              
+    - Max Maischein <corion at cpan.org>
+generated_by:        ExtUtils::MakeMaker version 6.42
 distribution_type:   module
 requires:     
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
-    version: 1.2
-author:
-    - Max Maischein <corion at cpan.org>
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

Modified: trunk/libtest-without-module-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-without-module-perl/debian/changelog?rev=26312&op=diff
==============================================================================
--- trunk/libtest-without-module-perl/debian/changelog (original)
+++ trunk/libtest-without-module-perl/debian/changelog Tue Oct 28 20:55:58 2008
@@ -1,8 +1,20 @@
-libtest-without-module-perl (0.15-2) UNRELEASED; urgency=low
+libtest-without-module-perl (0.16-1) unstable; urgency=low
+  
+  [ David Paleino ]
+  * debian/control: removed myself from Uploaders
+  
+  [ Rene Mayorga ]
+  * New upstream release
+  * debian/control 
+    + set dephelper and compat level to 7
+    + add myself to uploaders
+    + set Standards-Version to 3.8.0 ( no changes needed )
+    + mention module name at long description
+    + add libfile-slurp-perl to B-D-I, this will enable one more test
+  * debian/rules - refresh using dh-make-perl templates
+  * debian/copyright - use (new)format
 
-  * debian/control: removed myself from Uploaders
-
- -- David Paleino <d.paleino at gmail.com>  Fri, 22 Feb 2008 12:56:18 +0100
+ -- Rene Mayorga <rmayorga at debian.org.sv>  Tue, 28 Oct 2008 14:15:02 -0600
 
 libtest-without-module-perl (0.15-1) unstable; urgency=low
 

Modified: trunk/libtest-without-module-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-without-module-perl/debian/compat?rev=26312&op=diff
==============================================================================
--- trunk/libtest-without-module-perl/debian/compat (original)
+++ trunk/libtest-without-module-perl/debian/compat Tue Oct 28 20:55:58 2008
@@ -1,1 +1,1 @@
-5
+7

Modified: trunk/libtest-without-module-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-without-module-perl/debian/control?rev=26312&op=diff
==============================================================================
--- trunk/libtest-without-module-perl/debian/control (original)
+++ trunk/libtest-without-module-perl/debian/control Tue Oct 28 20:55:58 2008
@@ -1,10 +1,12 @@
 Source: libtest-without-module-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 5.0.0)
-Build-Depends-Indep: perl (>= 5.8.8-11.1), libtest-pod-perl
+Build-Depends: debhelper (>= 7)
+Build-Depends-Indep: perl (>= 5.8.8-11.1), libtest-pod-perl, 
+ libfile-slurp-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Standards-Version: 3.7.2
+Uploaders: Rene Mayorga <rmayorga at debian.org.sv>
+Standards-Version: 3.8.0
 Homepage: http://search.cpan.org/dist/Test-Without-Module/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libtest-without-module-perl/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-without-module-perl/
@@ -13,6 +15,6 @@
 Architecture: all
 Depends: ${perl:Depends}, ${misc:Depends}
 Description: test fallback behaviour in absence of modules
- This module allows you to deliberately hide modules from a program
+ Test::Without::Module allows you to deliberately hide modules from a program
  even though they are installed. This is mostly useful for testing modules
  that have a fallback when a certain dependency module is not installed.

Modified: trunk/libtest-without-module-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-without-module-perl/debian/copyright?rev=26312&op=diff
==============================================================================
--- trunk/libtest-without-module-perl/debian/copyright (original)
+++ trunk/libtest-without-module-perl/debian/copyright Tue Oct 28 20:55:58 2008
@@ -1,18 +1,29 @@
-This is the debian package for the Test-Without-Module module.
-It was created by David Paleino <d.paleino at gmail.com> using dh-make-perl.
+Format-Specification:
+    http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
+Upstream-Maintainer: Max Maischein <corion at cpan.org>
+Upstream-Source: http://search.cpan.org/dist/Test-Without-Module
+Upstream-Name: Test-Without-Module
 
-It was downloaded from http://search.cpan.org/dist/Test-Without-Module/
+Files: *
+Copyright: 2003-2007 Max Maischein, <corion at cpan.org>
+License-Alias: Perl
+License: Artistic | GPL-1+
 
-The upstream author is: Max Maischein <corion at cpan.org>.
+Files: debian/*
+Copyright: 2007-2008, various members of the Debian Perl Group, cf.
+ debian/changelog
+License: Artistic | GPL-1+
 
-Copyright (c) 2003-2007 Max Maischein, <corion at cpan.org>
+License: Artistic
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Artistic License, which comes with Perl.
+    On Debian GNU/Linux systems, the complete text of the Artistic License
+    can be found in /usr/share/common-licenses/Artistic
 
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
-
-On Debian systems, the complete text of the Artistic license can be found in
-`/usr/share/common-licenses/Artistic'. The complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
-
-The Debian packaging is (C) 2007, David Paleino <d.paleino at gmail.com> and
-is licensed under the same terms as the software itself (see above).
+License: GPL-1+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 1, or (at your option)
+    any later version.
+    On Debian GNU/Linux systems, the complete text of the GNU General
+    Public License can be found in `/usr/share/common-licenses/GPL'

Modified: trunk/libtest-without-module-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-without-module-perl/debian/rules?rev=26312&op=diff
==============================================================================
--- trunk/libtest-without-module-perl/debian/rules (original)
+++ trunk/libtest-without-module-perl/debian/rules Tue Oct 28 20:55:58 2008
@@ -1,69 +1,23 @@
 #!/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
-
-# If set to a true value then MakeMaker's prompt function will
-# 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)
 
 build: build-stamp
 build-stamp:
-	dh_testdir
-	$(PERL) Makefile.PL INSTALLDIRS=vendor \
-		INSTALLVENDORARCH=/usr/share/perl5/ \
-		VENDORARCHEXP=/usr/share/perl5/
-	$(MAKE)
-	$(MAKE) test
-
+	dh build
 	touch $@
 
 clean:
-	dh_testdir
-	dh_testroot
+	dh $@
 
-	dh_clean build-stamp install-stamp
-
-	[ ! -f Makefile ] || $(MAKE) realclean
-
-install: build install-stamp
-install-stamp:
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-
-	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
-
+install: install-stamp
+install-stamp: build-stamp
+	dh install
 	touch $@
 
 binary-arch:
-binary-indep: build install
-	dh_testdir
-	dh_testroot
-	dh_installdocs README
-	dh_installchangelogs Changes
-	dh_perl
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
 
-source diff:
-	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+binary-indep: install
+	dh $@
 
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary
+binary: binary-arch binary-indep
+
+.PHONY: binary binary-arch binary-indep install clean build

Modified: trunk/libtest-without-module-perl/lib/Test/Without/Module.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-without-module-perl/lib/Test/Without/Module.pm?rev=26312&op=diff
==============================================================================
--- trunk/libtest-without-module-perl/lib/Test/Without/Module.pm (original)
+++ trunk/libtest-without-module-perl/lib/Test/Without/Module.pm Tue Oct 28 20:55:58 2008
@@ -3,7 +3,7 @@
 use Carp qw( croak );
 
 use vars qw( $VERSION );
-$VERSION = 0.15;
+$VERSION = 0.16;
 
 use vars qw( %forbidden );
 
@@ -15,8 +15,10 @@
   my ($self, at forbidden_modules) = @_;
 
   my $forbidden = get_forbidden_list;
-  $forbidden->{$_} = $_
-    for @forbidden_modules;
+  
+  for (@forbidden_modules) {
+      $forbidden->{$_} = $INC{ module2file($_) };
+  };
 
   # Scrub %INC, so that loaded modules disappear
   for my $module (@forbidden_modules) {
@@ -28,14 +30,13 @@
 
 sub fake_module {
     my ($self,$module_file,$member_only) = @_;
-    #warn $@ if $@; # Don't touch $@, or .al files will not load anymore????
+    # Don't touch $@, or .al files will not load anymore????
 
     my $forbidden = get_forbidden_list;
 
     my $modulename = file2module($module_file);
 
     # Deliver a faked, nonworking module
-    #if (grep { $modulename =~ /\Q$_\E/ } keys %$forbidden) {
     if (exists $forbidden->{$modulename}) {
       my @faked_module = ("package $modulename;","0;");
       return sub { defined ( $_ = shift @faked_module ) };
@@ -45,11 +46,15 @@
 sub unimport {
   my ($self, at list) = @_;
   my $module;
-  my $forbidden = \%forbidden;
+  my $forbidden = get_forbidden_list;
+
   for $module (@list) {
     if (exists $forbidden->{$module}) {
-      delete $forbidden->{$module};
-      scrub( $module );
+      if (defined $forbidden->{$module}) {
+          $INC{ module2file($module) } = delete $forbidden->{$module};
+      } else {
+          delete $forbidden->{$module};
+      };
     } else {
       croak "Can't allow non-forbidden module $module";
     };
@@ -63,13 +68,20 @@
   $mod;
 };
 
+sub module2file {
+  my ($mod) = @_;
+  $mod =~ s!::|'!/!g;
+  $mod .= ".pm";
+  $mod;
+};
+
 sub scrub {
   my ($module) = @_;
-  my $key;
-  for $key (keys %INC) {
-    delete $INC{$key}
-      if (file2module($key) =~ /\Q$module\E$/);
-      #if (file2module($key) =~ $module);
+  for my $key (keys %INC) {
+    my $fn = file2module($key);
+    if ($fn =~ /\Q$module\E$/) {
+        delete $INC{$key};
+    };
   };
 };
 




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