diff -Nru libend-perl-1.2/debian/changelog libend-perl-2009040201/debian/changelog --- libend-perl-1.2/debian/changelog 2009-04-29 12:24:44.000000000 +0100 +++ libend-perl-2009040201/debian/changelog 2009-04-29 12:24:44.000000000 +0100 @@ -1,3 +1,22 @@ +libend-perl (2009040201-1) unstable; urgency=low + + [ gregor herrmann ] + * debian/control: Changed: Switched Vcs-Browser field to ViewSVN + (source stanza). + + [ Ryan Niebur ] + * New upstream release + * Add myself to Uploaders + * Debian Policy 3.8.1 + * machine readable copyright format + * dh 7 + * fix short description + + [ gregor herrmann ] + * debian/{control,copyright}: change my email address. + + -- Ryan Niebur Fri, 10 Apr 2009 22:03:57 -0700 + libend-perl (1.2-7) unstable; urgency=low * debian/rules: delete /usr/lib/perl5 only if it exists (closes: #467784). diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/debian/compat /tmp/0Q1TcJHrCb/libend-perl-2009040201/debian/compat --- libend-perl-1.2/debian/compat 2009-04-29 12:24:44.000000000 +0100 +++ libend-perl-2009040201/debian/compat 2009-04-29 12:24:44.000000000 +0100 @@ -1 +1 @@ -5 +7 diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/debian/control /tmp/0Q1TcJHrCb/libend-perl-2009040201/debian/control --- libend-perl-1.2/debian/control 2009-04-29 12:24:44.000000000 +0100 +++ libend-perl-2009040201/debian/control 2009-04-29 12:24:44.000000000 +0100 @@ -1,20 +1,20 @@ Source: libend-perl Section: perl Priority: optional -Build-Depends: debhelper (>= 5) +Build-Depends: debhelper (>= 7) Build-Depends-Indep: perl (>= 5.8.0-7) Maintainer: Debian Perl Group Uploaders: Gunnar Wolf , Damyan Ivanov , - gregor herrmann -Standards-Version: 3.7.3 + gregor herrmann , Ryan Niebur +Standards-Version: 3.8.1 Homepage: http://search.cpan.org/dist/End/ Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libend-perl/ -Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libend-perl/ +Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libend-perl/ Package: libend-perl Architecture: all Depends: ${perl:Depends}, ${misc:Depends} -Description: Generalized END {} +Description: Perl interface for a generalized END {} The End module exports a single subroutine, end, which allows you to set up some code that is run whenever the current block is exited, regardless whether that is due to a return, next, last, redo, exit, die, goto or just reaching diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/debian/copyright /tmp/0Q1TcJHrCb/libend-perl-2009040201/debian/copyright --- libend-perl-1.2/debian/copyright 2009-04-29 12:24:44.000000000 +0100 +++ libend-perl-2009040201/debian/copyright 2009-04-29 12:24:44.000000000 +0100 @@ -1,30 +1,39 @@ -This is the debian package for the End module. -It was created by Marc Brockschmidt using dh-make-perl. -It is currently maintained by the Debian Perl Group. For further -information see http://pkg-perl.alioth.debian.org/ - -The sources were downloaded from CPAN: -http://www.cpan.org/modules/by-module/End/ - -The upstream author is: Abigail - -This program is copyright 2000 by Abigail. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT -OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - +Format-Specification: + http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 +Upstream-Maintainer: Abigail +Upstream-Source: http://search.cpan.org/dist/End/ +Upstream-Name: End + +Files: * +Copyright: 2000 - 2009, Abigail +License: MIT + +Files: debian/* +Copyright: 2003, Marc Brockschmidt + 2004, Marc 'HE' Brockschmidt + 2005, Andrew Pollock + 2006, David Moreno Garza + 2006, Gunnar Wolf + 2007, Damyan Ivanov + 2008, gregor herrmann + 2009, Ryan Niebur +License: MIT + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT + OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/debian/rules /tmp/0Q1TcJHrCb/libend-perl-2009040201/debian/rules --- libend-perl-1.2/debian/rules 2009-04-29 12:24:44.000000000 +0100 +++ libend-perl-2009040201/debian/rules 2009-04-29 12:24:44.000000000 +0100 @@ -1,74 +1,23 @@ #!/usr/bin/make -f -#-*- makefile -*- -# Made with the aid of dh_make, by Craig Small -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -# Some lines taken from debmake, by Christoph Lameter. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -PACKAGE=$(shell dh_listpackages) - -ifndef PERL -PERL = /usr/bin/perl -endif - -TMP =$(CURDIR)/debian/$(PACKAGE) build: build-stamp build-stamp: - dh_testdir - - # Add here commands to compile the package. - $(PERL) Makefile.PL INSTALLDIRS=vendor - $(MAKE) - $(MAKE) test - + dh build touch $@ clean: - dh_testdir - dh_testroot - rm -f build-stamp install-stamp - - # Add here commands to clean up after the build process. - [ ! -f Makefile ] || $(MAKE) realclean - - dh_clean + dh $@ install: install-stamp install-stamp: build-stamp - dh_testdir - dh_testroot - dh_clean -k - - # Add here commands to install the package into debian/tmp. - $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr - [ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)/usr/lib/perl5 - + dh install touch $@ +binary-arch: -# Build architecture-dependent files here. -binary-arch: build install -# We have nothing to do by default. - -# Build architecture-independent files here. -binary-indep: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_compress - dh_fixperms - dh_installdeb - dh_perl - dh_gencontrol - dh_md5sums - dh_builddeb +binary-indep: install + dh $@ -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false +binary: binary-arch binary-indep -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary +.PHONY: binary binary-arch binary-indep install clean build diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/End.pm /tmp/0Q1TcJHrCb/libend-perl-2009040201/End.pm --- libend-perl-1.2/End.pm 2000-05-31 21:26:41.000000000 +0100 +++ libend-perl-2009040201/End.pm 1970-01-01 01:00:00.000000000 +0100 @@ -1,120 +0,0 @@ -package End; - -# -# $Id: End.pm,v 1.2 2000/05/31 20:25:33 abigail Exp $ -# -# $Log: End.pm,v $ -# Revision 1.2 2000/05/31 20:25:33 abigail -# Added the license paragraph in the POD section. -# -# Revision 1.1 2000/05/31 19:35:01 abigail -# Initial revision -# - -use strict; - -use Exporter; -use vars qw /@EXPORT @ISA $VERSION/; - -@ISA = qw /Exporter/; -@EXPORT = qw /end/; - -($VERSION) = '$Revision: 1.2 $' =~ /([\d.]+)/; - -sub end (&) { - my $code = shift; - # Due to a bug in Perl 5.6.0, we can't just bless $code. - # But by creating an extra closure, it'll work. - bless sub {$code -> ()} => __PACKAGE__; -} - -DESTROY {$_ [0] -> ()} - -1; - -__END__ - -=pod - -=head1 NAME - -End - generalized END {}. - -=head1 SYNOPSIS - - use End; - - { my $foo = end {print "Leaving the block\n"}; - ... - last; # prints "Leaving the block\n". - ... - } - - -=head1 DESCRIPTION - -The module C exports a single subroutine C, which allows -you to set up some code that is run whenever the current block is exited, -regardless whether that is due to a C, C, C, C, -C, C, C or just reaching the end of the block. - -To be more precise, C returns an object, that will execute the -code when the object is destroyed; that is, when the variable assigned -to goes out of scope. If the variable is lexical to the current block, -the code will be executed when leaving the block. - -One can force premature execution of the code by undefining the variable -assigned to, or assigning another value to the variable. - -C only takes one argument, a code reference. If one wishes the code -reference to take arguments, wrapping the code reference in a closure -suffices. - -=head1 BUGS - -Due to a bug in Perl 5.6.0 (and perhaps before), anonymous subroutines -that are not a closure will not go out of scope, not even on program -termination. That is why C wraps the code fragment in a closure. - -There is a second bug in Perl 5.6.0 (and perhaps before) why this is -necessary. If the code fragment isn't wrapped in another code reference, -the original subroutine will be blessed in the package, making that C -on that code no longer returns the right value. - -=head1 REVISION HISTORY - - $Log: End.pm,v $ - Revision 1.2 2000/05/31 20:25:33 abigail - Added the license paragraph in the POD section. - - Revision 1.1 2000/05/31 19:35:01 abigail - Initial revision - - -=head1 AUTHOR - -This package was written by Abigail, I. - -=head1 COPYRIGHT & LICENSE - -This program is copyright 2000 by Abigail. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT -OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -=cut diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/lib/End.pm /tmp/0Q1TcJHrCb/libend-perl-2009040201/lib/End.pm --- libend-perl-1.2/lib/End.pm 1970-01-01 01:00:00.000000000 +0100 +++ libend-perl-2009040201/lib/End.pm 2009-04-02 19:54:15.000000000 +0100 @@ -0,0 +1,107 @@ +package End; + +use 5.006; + +use strict; +use warnings; +no warnings 'syntax'; + +use Exporter; + +our @ISA = qw /Exporter/; +our @EXPORT = qw /end/; + +our $VERSION = '2009040201'; + +sub end (&) { + my $code = shift; + # Due to a bug in Perl 5.6.0, we can't just bless $code. + # But by creating an extra closure, it'll work. + bless sub {$code -> ()} => __PACKAGE__; +} + +DESTROY {$_ [0] -> ()} + +1; + +__END__ + +=pod + +=head1 NAME + +End - generalized END {}. + +=head1 SYNOPSIS + + use End; + + { my $foo = end {print "Leaving the block\n"}; + ... + last; # prints "Leaving the block\n". + ... + } + + +=head1 DESCRIPTION + +The module C exports a single subroutine C, which allows +you to set up some code that is run whenever the current block is exited, +regardless whether that is due to a C, C, C, C, +C, C, C or just reaching the end of the block. + +To be more precise, C returns an object, that will execute the +code when the object is destroyed; that is, when the variable assigned +to goes out of scope. If the variable is lexical to the current block, +the code will be executed when leaving the block. + +One can force premature execution of the code by undefining the variable +assigned to, or assigning another value to the variable. + +C only takes one argument, a code reference. If one wishes the code +reference to take arguments, wrapping the code reference in a closure +suffices. + +=head1 BUGS + +Due to a bug in Perl 5.6.0 (and perhaps before), anonymous subroutines +that are not a closure will not go out of scope, not even on program +termination. That is why C wraps the code fragment in a closure. + +There is a second bug in Perl 5.6.0 (and perhaps before) why this is +necessary. If the code fragment isn't wrapped in another code reference, +the original subroutine will be blessed in the package, making that C +on that code no longer returns the right value. + +=head1 DEVELOPMENT + +The current sources of this module are found on github, +L<< git://github.com/Abigail/end.git >>. + +=head1 AUTHOR + +This package was written by Abigail, L<< mailto:cpan@abigail.be >> + +=head1 COPYRIGHT & LICENSE + +Copyright (C) 2000 - 2009, Abigail + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +=cut diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/Makefile.PL /tmp/0Q1TcJHrCb/libend-perl-2009040201/Makefile.PL --- libend-perl-1.2/Makefile.PL 2000-05-31 20:04:42.000000000 +0100 +++ libend-perl-2009040201/Makefile.PL 2009-04-02 19:39:19.000000000 +0100 @@ -3,6 +3,7 @@ # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'End', - 'VERSION_FROM' => 'End.pm', # finds $VERSION + 'VERSION_FROM' => 'lib/End.pm', # finds $VERSION 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 + AUTHOR => 'Abigail ', ); diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/MANIFEST /tmp/0Q1TcJHrCb/libend-perl-2009040201/MANIFEST --- libend-perl-1.2/MANIFEST 2000-05-31 20:04:42.000000000 +0100 +++ libend-perl-2009040201/MANIFEST 2009-04-02 19:56:35.000000000 +0100 @@ -1,4 +1,5 @@ -End.pm +lib/End.pm MANIFEST Makefile.PL -test.pl +t/000_tests.t +META.yml Module meta-data (added by MakeMaker) diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/META.yml /tmp/0Q1TcJHrCb/libend-perl-2009040201/META.yml --- libend-perl-1.2/META.yml 1970-01-01 01:00:00.000000000 +0100 +++ libend-perl-2009040201/META.yml 2009-04-02 19:56:35.000000000 +0100 @@ -0,0 +1,13 @@ +--- #YAML:1.0 +name: End +version: 2009040201 +abstract: ~ +license: ~ +author: + - Abigail +generated_by: ExtUtils::MakeMaker version 6.42 +distribution_type: module +requires: +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.3.html + version: 1.3 diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/t/000_tests.t /tmp/0Q1TcJHrCb/libend-perl-2009040201/t/000_tests.t --- libend-perl-1.2/t/000_tests.t 1970-01-01 01:00:00.000000000 +0100 +++ libend-perl-2009040201/t/000_tests.t 2009-04-02 19:48:30.000000000 +0100 @@ -0,0 +1,34 @@ +# Before `make install' is performed this script should be runnable with +# `make test'. After `make install' it should work as `perl test.pl' + +######################### We start with some black magic to print on failure. + +# Change 1..1 below to 1..last_test_to_print . +# (It may become useful if the test is moved to ./t subdirectory.) + +BEGIN { $| = 1; print "1..3\n"; } +END {print "not ok 1\n" unless $loaded;} +use End; +$loaded = 1; +print "ok 1\n"; + +######################### End of black magic. + +# Insert your test code below (better if it prints "ok 13" +# (correspondingly "not ok 13") depending on the success of chunk 13 +# of the test code): + +my $i = 1; +{ my $foo = end {$i ++}; + $i += 2; + last; + $i += 2; +} +print $i == 4 ? "ok 2\n" : "not ok 2\n"; + +my $sum = 0; +foreach my $i (1 .. 9) { + my $foo = end {$sum += $i}; + next; +} +print $sum == 45 ? "ok 3\n" : "not ok 3\n"; diff -Nru /tmp/uXeYXEfvAJ/libend-perl-1.2/test.pl /tmp/0Q1TcJHrCb/libend-perl-2009040201/test.pl --- libend-perl-1.2/test.pl 2000-05-31 20:18:26.000000000 +0100 +++ libend-perl-2009040201/test.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,34 +0,0 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl test.pl' - -######################### We start with some black magic to print on failure. - -# Change 1..1 below to 1..last_test_to_print . -# (It may become useful if the test is moved to ./t subdirectory.) - -BEGIN { $| = 1; print "1..1\n"; } -END {print "not ok 1\n" unless $loaded;} -use End; -$loaded = 1; -print "ok 1\n"; - -######################### End of black magic. - -# Insert your test code below (better if it prints "ok 13" -# (correspondingly "not ok 13") depending on the success of chunk 13 -# of the test code): - -my $i = 1; -{ my $foo = end {$i ++}; - $i += 2; - last; - $i += 2; -} -print $i == 4 ? "ok 2\n" : "not ok 2\n"; - -my $sum = 0; -foreach my $i (1 .. 9) { - my $foo = end {$sum += $i}; - next; -} -print $sum == 45 ? "ok 3\n" : "not ok 3\n";