r28307 - in /trunk/libsub-identify-perl: ./ debian/ lib/Sub/ t/
rmayorga-guest at users.alioth.debian.org
rmayorga-guest at users.alioth.debian.org
Wed Dec 17 05:44:49 UTC 2008
Author: rmayorga-guest
Date: Wed Dec 17 05:44:39 2008
New Revision: 28307
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28307
Log:
* New upstream release
* debian/control
+ set standards-version to 3.8.0 (no changes)
+ add myself to uploaders
+ change from `Architecture: all' to `Architecture: any'
+ add ${shlib:Depends} to Depends field
+ move B-D-I to B-D
* debian/rules - refresh using dh-make-perl
* debian/copyright
+ refresh using dh-make-perl
+ add ppport.h copyright info
* debian/watch - remove comments
Added:
trunk/libsub-identify-perl/Identify.xs
- copied unchanged from r28306, branches/upstream/libsub-identify-perl/current/Identify.xs
trunk/libsub-identify-perl/ppport.h
- copied unchanged from r28306, branches/upstream/libsub-identify-perl/current/ppport.h
trunk/libsub-identify-perl/t/10pureperl-basic.t
- copied unchanged from r28306, branches/upstream/libsub-identify-perl/current/t/10pureperl-basic.t
trunk/libsub-identify-perl/t/20attributes.t
- copied unchanged from r28306, branches/upstream/libsub-identify-perl/current/t/20attributes.t
trunk/libsub-identify-perl/t/21attributes-pureperl.t
- copied unchanged from r28306, branches/upstream/libsub-identify-perl/current/t/21attributes-pureperl.t
Modified:
trunk/libsub-identify-perl/Changes
trunk/libsub-identify-perl/MANIFEST
trunk/libsub-identify-perl/META.yml
trunk/libsub-identify-perl/Makefile.PL
trunk/libsub-identify-perl/debian/changelog
trunk/libsub-identify-perl/debian/control
trunk/libsub-identify-perl/debian/copyright
trunk/libsub-identify-perl/debian/rules
trunk/libsub-identify-perl/debian/watch
trunk/libsub-identify-perl/lib/Sub/Identify.pm
trunk/libsub-identify-perl/t/01basic.t
Modified: trunk/libsub-identify-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/Changes?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/Changes (original)
+++ trunk/libsub-identify-perl/Changes Wed Dec 17 05:44:39 2008
@@ -1,4 +1,15 @@
-Rafael Garcia-Suarez (13):
+0.04- Rafael Garcia-Suarez (9):
+ First stab as a dual implementation XS / pure Perl
+ Update MANIFEST and add ppport.h from bleadperl
+ Bump version to 0.04
+ Add license to Makefile.PL
+ Re-add "use strict"
+ Mortalize return values
+ Add tests for a bug reported on P5P by Renée Bäcker
+ Fix segfault / compilation error by returning nothing for a sub being compiled
+ Regenerate META.yml
+
+0.03- Rafael Garcia-Suarez (13):
Import Sub-Identify 0.02
Add MANIFEST.SKIP file
Add get_code_info, as suggested by Shawn M Moore
@@ -12,4 +23,3 @@
Pre-require Test::More
Add copyright and license
Bump version and regenerate the META.yml
-
Modified: trunk/libsub-identify-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/MANIFEST?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/MANIFEST (original)
+++ trunk/libsub-identify-perl/MANIFEST Wed Dec 17 05:44:39 2008
@@ -1,7 +1,12 @@
lib/Sub/Identify.pm
+Identify.xs
+ppport.h
t/01basic.t
t/02errors.t
+t/10pureperl-basic.t
t/pod.t
+t/20attributes.t
+t/21attributes-pureperl.t
Makefile.PL
MANIFEST
MANIFEST.SKIP
Modified: trunk/libsub-identify-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/META.yml?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/META.yml (original)
+++ trunk/libsub-identify-perl/META.yml Wed Dec 17 05:44:39 2008
@@ -1,11 +1,13 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Sub-Identify
-version: 0.03
-version_from: lib/Sub/Identify.pm
-installdirs: site
-requires:
+--- #YAML:1.0
+name: Sub-Identify
+version: 0.04
+abstract: ~
+license: perl
+author: ~
+generated_by: ExtUtils::MakeMaker version 6.42
+distribution_type: module
+requires:
Test::More: 0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30_01
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
Modified: trunk/libsub-identify-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/Makefile.PL?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/Makefile.PL (original)
+++ trunk/libsub-identify-perl/Makefile.PL Wed Dec 17 05:44:39 2008
@@ -3,6 +3,7 @@
WriteMakefile(
NAME => "Sub::Identify",
VERSION_FROM => "lib/Sub/Identify.pm",
+ LICENSE => 'perl',
PREREQ_PM => {
'Test::More' => 0,
},
Modified: trunk/libsub-identify-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/debian/changelog?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/debian/changelog (original)
+++ trunk/libsub-identify-perl/debian/changelog Wed Dec 17 05:44:39 2008
@@ -1,9 +1,24 @@
-libsub-identify-perl (0.03-2) UNRELEASED; urgency=low
-
+libsub-identify-perl (0.04-1) unstable; urgency=low
+
+ [ gregor hermann ]
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
(source stanza).
+
+ [ Rene Mayorga ]
+ * New upstream release
+ * debian/control
+ + set standards-version to 3.8.0 (no changes)
+ + add myself to uploaders
+ + change from `Architecture: all' to `Architecture: any'
+ + add ${shlib:Depends} to Depends field
+ + move B-D-I to B-D
+ * debian/rules - refresh using dh-make-perl
+ * debian/copyright
+ + refresh using dh-make-perl
+ + add ppport.h copyright info
+ * debian/watch - remove comments
- -- gregor herrmann <gregoa at debian.org> Sun, 16 Nov 2008 20:47:11 +0100
+ -- Rene Mayorga <rmayorga at debian.org.sv> Tue, 16 Dec 2008 21:36:28 -0600
libsub-identify-perl (0.03-1) unstable; urgency=low
Modified: trunk/libsub-identify-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/debian/control?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/debian/control (original)
+++ trunk/libsub-identify-perl/debian/control Wed Dec 17 05:44:39 2008
@@ -1,19 +1,18 @@
Source: libsub-identify-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7)
-Build-Depends-Indep: perl (>= 5.6.10-12)
+Build-Depends: debhelper (>= 7), perl (>= 5.6.10-12)
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Krzysztof Krzyżaniak (eloy) <eloy at debian.org>
-Standards-Version: 3.7.3
+Uploaders: Krzysztof Krzyżaniak (eloy) <eloy at debian.org>,
+ Rene Mayorga <rmayorga at debian.org.sv>
+Standards-Version: 3.8.0
Homepage: http://search.cpan.org/dist/Sub-Identify/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libsub-identify-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libsub-identify-perl/
-
Package: libsub-identify-perl
-Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}
+Architecture: any
+Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}
Description: Retrieve names of code references
Sub::Identify allows you to retrieve the real name of code references. For
this, it uses perl's introspection mechanism, provided by the B module.
Modified: trunk/libsub-identify-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/debian/copyright?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/debian/copyright (original)
+++ trunk/libsub-identify-perl/debian/copyright Wed Dec 17 05:44:39 2008
@@ -1,26 +1,35 @@
-This is the debian package for the Sub-Identify module.
-It was created by Krzysztof Krzyżaniak (eloy) <eloy at debian.org> using dh-make-perl.
+Format-Specification:
+ http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
+Upstream-Maintainer: (information incomplete)
+Upstream-Source: http://search.cpan.org/dist/Sub-Identify/
+Upstream-Name: Sub-Identify
-It was downloaded from http://search.cpan.org/dist/Sub-Identify/
+Files: *
+Copyright: (c) 2005-2008 Garcia-Suarez <rgarciasuarez at gmail.com>
+License-Alias: Perl
+License: Artistic | GPL-1+
-Copyright (c) Rafael Garcia-Suarez (rgarciasuarez at gmail dot com) 2005, 2008
+Files: ppport.h
+Copyright: (c) 1999, Kenneth Albanowski.
+ (c) 2001, Paul Marquess
+ (c) 2004-2008, Marcus Holland-Moritz
+License-Alias: Perl
+License: Artistic | GPL-1+
-This program is free software, you can redistribute it and/or modify it under
-the same terms as Perl itself.
+Files: debian/*
+Copyright: 2008, Krzysztof Krzyżaniak (eloy) <eloy at debian.org>
+License: Artistic | GPL-1+
-Perl is distributed under licenses:
+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'
- a) the GNU General Public License as published by the Free Software
- Foundation; either version 1, or (at your option) any later
- version, or
-
- b) the "Artistic License" which comes with Perl.
-
+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' and
- the Artistic Licence in /usr/share/common-licenses/Artistic'.
-
-
-
-The Debian packaging is (C) 2008, Krzysztof Krzyżaniak (eloy) <eloy at debian.org> and
-is licensed under the same terms as the software itself (see above).
+ Public License can be found in `/usr/share/common-licenses/GPL'
Modified: trunk/libsub-identify-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/debian/rules?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/debian/rules (original)
+++ trunk/libsub-identify-perl/debian/rules Wed Dec 17 05:44:39 2008
@@ -1,18 +1,23 @@
#!/usr/bin/make -f
-build:
+build: build-stamp
+build-stamp:
dh build
+ touch $@
clean:
- dh clean
+ dh $@
-install: build
+install: install-stamp
+install-stamp: build-stamp
dh install
+ touch $@
binary-arch: install
- # nothing
+ dh $@
-binary-indep: install
- dh binary-indep
+binary-indep:
binary: binary-arch binary-indep
+
+.PHONY: binary binary-arch binary-indep install clean build
Modified: trunk/libsub-identify-perl/debian/watch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/debian/watch?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/debian/watch (original)
+++ trunk/libsub-identify-perl/debian/watch Wed Dec 17 05:44:39 2008
@@ -1,4 +1,2 @@
-# format version number, currently 3; this line is compulsory!
version=3
-# URL to the package page followed by a regex to search
http://search.cpan.org/dist/Sub-Identify/ .*/Sub-Identify-v?(\d[\d_.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$
Modified: trunk/libsub-identify-perl/lib/Sub/Identify.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/lib/Sub/Identify.pm?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/lib/Sub/Identify.pm (original)
+++ trunk/libsub-identify-perl/lib/Sub/Identify.pm Wed Dec 17 05:44:39 2008
@@ -1,40 +1,53 @@
package Sub::Identify;
-use B ();
+use strict;
use Exporter;
-$VERSION = '0.03';
- at ISA = ('Exporter');
-%EXPORT_TAGS = (all => [ @EXPORT_OK = qw(sub_name stash_name sub_fullname get_code_info) ]);
+BEGIN {
+ our $VERSION = '0.04';
+ our @ISA = ('Exporter');
+ our %EXPORT_TAGS = (all => [ our @EXPORT_OK = qw(sub_name stash_name sub_fullname get_code_info) ]);
-use strict;
+ my $loaded = 0;
+ unless ($ENV{PERL_SUB_IDENTIFY_PP}) {
+ local $@;
+ eval {
+ if ($] >= 5.006) {
+ require XSLoader;
+ XSLoader::load(__PACKAGE__, $VERSION);
+ }
+ else {
+ require DynaLoader;
+ push @ISA, 'DynaLoader';
+ __PACKAGE__->bootstrap($VERSION);
+ }
+ };
-sub _cv {
- my ($coderef) = @_;
- ref $coderef or return undef;
- my $cv = B::svref_2object($coderef);
- $cv->isa('B::CV') ? $cv : undef;
+ die $@ if $@ && $@ !~ /object version|loadable object/;
+
+ $loaded = 1 unless $@;
+ }
+
+ our $IsPurePerl = !$loaded;
+
+ if ($IsPurePerl) {
+ require B;
+ *get_code_info = sub ($) {
+ my ($coderef) = @_;
+ ref $coderef or return;
+ my $cv = B::svref_2object($coderef);
+ $cv->isa('B::CV') or return;
+ # bail out if GV is undefined
+ $cv->GV->isa('B::SPECIAL') and return;
+
+ return ($cv->GV->STASH->NAME, $cv->GV->NAME);
+ };
+ }
}
-sub sub_name {
- my $cv = &_cv or return undef;
- $cv->GV->NAME;
-}
-
-sub stash_name {
- my $cv = &_cv or return undef;
- $cv->GV->STASH->NAME;
-}
-
-sub sub_fullname {
- my $cv = &_cv or return undef;
- $cv->GV->STASH->NAME . '::' . $cv->GV->NAME;
-}
-
-sub get_code_info {
- my $cv = &_cv or return undef;
- ($cv->GV->STASH->NAME, $cv->GV->NAME);
-}
+sub stash_name ($) { (get_code_info($_[0]))[0] }
+sub sub_name ($) { (get_code_info($_[0]))[1] }
+sub sub_fullname ($) { join '::', get_code_info($_[0]) }
1;
Modified: trunk/libsub-identify-perl/t/01basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libsub-identify-perl/t/01basic.t?rev=28307&op=diff
==============================================================================
--- trunk/libsub-identify-perl/t/01basic.t (original)
+++ trunk/libsub-identify-perl/t/01basic.t Wed Dec 17 05:44:39 2008
@@ -3,6 +3,8 @@
use Test::More tests => 30;
BEGIN { use_ok 'Sub::Identify', ':all' }
+
+diag "running pure-Perl version of Sub::Identify" if $Sub::Identify::IsPurePerl;
sub buffy { }
sub vamp::spike { }
More information about the Pkg-perl-cvs-commits
mailing list