r31876 - in /trunk/libb-keywords-perl: Changes META.yml debian/changelog lib/B/Keywords.pm t/11keywords.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Tue Mar 10 18:33:46 UTC 2009
Author: gregoa
Date: Tue Mar 10 18:33:35 2009
New Revision: 31876
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=31876
Log:
New upstream release.
Modified:
trunk/libb-keywords-perl/Changes
trunk/libb-keywords-perl/META.yml
trunk/libb-keywords-perl/debian/changelog
trunk/libb-keywords-perl/lib/B/Keywords.pm
trunk/libb-keywords-perl/t/11keywords.t
Modified: trunk/libb-keywords-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-keywords-perl/Changes?rev=31876&op=diff
==============================================================================
--- trunk/libb-keywords-perl/Changes (original)
+++ trunk/libb-keywords-perl/Changes Tue Mar 10 18:33:35 2009
@@ -38,3 +38,8 @@
- Added EQ GE GT NE LE LT for 5.6.
1.08
- Removed useless author tests
+1.09
+ - 856e84486be2089095a27b18f1344eca29a9ff50 Update administrivia in docs
+ - b41ee8b135c9d2e0e7eda38dc17f3327f60f1cda $\ was missing from @Scalars.
+ - a64e7f604687eda699fe778bcb070f3e715741b0 @Functions missing from @Symbols
+ - bb14cdd3b3e5223fbb904cfbbe87fbcb5f6d8db2 Fix use B::Keywords qw(:all);
Modified: trunk/libb-keywords-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-keywords-perl/META.yml?rev=31876&op=diff
==============================================================================
--- trunk/libb-keywords-perl/META.yml (original)
+++ trunk/libb-keywords-perl/META.yml Tue Mar 10 18:33:35 2009
@@ -1,13 +1,10 @@
---- #YAML:1.0
-name: B-Keywords
-version: 1.08
-abstract: Lists of reserved barewords and symbol names
-license: ~
-generated_by: ExtUtils::MakeMaker version 6.36
-distribution_type: module
-requires:
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
-author:
- - Joshua ben Jore <jjore at cpan.org>
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: B-Keywords
+version: 1.09
+version_from: lib/B/Keywords.pm
+installdirs: site
+requires:
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.30
Modified: trunk/libb-keywords-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-keywords-perl/debian/changelog?rev=31876&op=diff
==============================================================================
--- trunk/libb-keywords-perl/debian/changelog (original)
+++ trunk/libb-keywords-perl/debian/changelog Tue Mar 10 18:33:35 2009
@@ -1,4 +1,4 @@
-libb-keywords-perl (1.08-3) UNRELEASED; urgency=low
+libb-keywords-perl (1.09-1) UNRELEASED; urgency=low
[ gregor herrmann ]
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
@@ -6,6 +6,9 @@
[ Rene Mayorga ]
* debian/control: update my email address.
+
+ [ gregor herrmann ]
+ * New upstream release.
-- Rene Mayorga <rmayorga at debian.org> Tue, 20 Jan 2009 01:26:51 -0600
Modified: trunk/libb-keywords-perl/lib/B/Keywords.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-keywords-perl/lib/B/Keywords.pm?rev=31876&op=diff
==============================================================================
--- trunk/libb-keywords-perl/lib/B/Keywords.pm (original)
+++ trunk/libb-keywords-perl/lib/B/Keywords.pm Tue Mar 10 18:33:35 2009
@@ -6,13 +6,14 @@
require Exporter;
*import = *import = \&Exporter::import;
+
use vars qw( @EXPORT_OK %EXPORT_TAGS );
- at EXPORT_OK = qw( @Scalars @Arrays @Hashes @FileHandles @Symbols
- @Functions @Barewords );
-%EXPORT_TAGS = ( ':all' => \@EXPORT_OK );
+ at EXPORT_OK = qw( @Scalars @Arrays @Hashes @Filehandles @Symbols
+ @Functions @Barewords );
+%EXPORT_TAGS = ( 'all' => \@EXPORT_OK );
use vars '$VERSION';
-$VERSION = '1.08';
+$VERSION = '1.09';
use vars '@Scalars';
@Scalars = (
@@ -27,7 +28,7 @@
$. $INPUT_LINE_NUMBER $NR
$/ $INPUT_RECORD_SEPARATOR $RS
$| $OUTPUT_AUTO_FLUSH ), '$,', qw( $OUTPUT_FIELD_SEPARATOR $OFS
- $OUTPUT_RECORD_SEPARATOR $ORS
+ $\ $OUTPUT_RECORD_SEPARATOR $ORS
$" $LIST_SEPARATOR
$; $SUBSCRIPT_SEPARATOR $SUBSEP
), '$#', qw( $OFMT
@@ -406,7 +407,7 @@
C<B::Keywords> supplies seven arrays of keywords: C<@Scalars>,
C<@Arrays>, C<@Hashes>, C<@Filehandles>, C<@Symbols>, C<@Functions>,
and C<@Barewords>. The C<@Symbols> array includes the contents of each
-of C<@Scalars>, C<@Arrays>, C<@Hashes>, and C<@Filehandles>.
+of C<@Scalars>, C<@Arrays>, C<@Hashes>, C<@Functions> and C<@Filehandles>.
Similarly, C<@Barewords> adds a few non-function keywords and
operators to the C<@Functions> array.
@@ -451,13 +452,51 @@
keywords.pl from the perl source, L<perlvar>, L<perlfunc>,
L<perldelta>.
-=head1 AUTHOR
-
-Joshua ben Jore <jjore at cpan.org>
+
+
+=head1 BUGS
+
+Please report any bugs or feature requests to C<bug-B-Keywords at
+rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=B-Keywords>. I will be
+notified, and then you'll automatically be notified of progress on
+your bug as I make changes.
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc B::Keywords
+
+You can also look for information at:
+
+=over
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=B-Keywords>
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/B-Keywords>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/B-Keywords>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/B-Keywords>
+
+=back
+
+=head1 ACKNOWLEDGEMENTS
+
+Michael G Schwern for patches
=head1 COPYRIGHT AND LICENSE
-Copyright 2007, Joshua ben Jore. All rights reserved.
+Copyright 2009 Joshua ben Jore, All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of either:
@@ -466,3 +505,11 @@
Foundation; version 2, or
b) the "Artistic License" which comes with Perl.
+
+=head1 SOURCE AVAILABILITY
+
+This source is in Github: L<git://github.com/jbenjore/b-keywords.git>
+
+=head1 AUTHOR
+
+Joshua ben Jore <jjore at cpan.org>
Modified: trunk/libb-keywords-perl/t/11keywords.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libb-keywords-perl/t/11keywords.t?rev=31876&op=diff
==============================================================================
--- trunk/libb-keywords-perl/t/11keywords.t (original)
+++ trunk/libb-keywords-perl/t/11keywords.t Tue Mar 10 18:33:35 2009
@@ -1,27 +1,48 @@
+#!/usr/bin/perl -w
+
use strict;
-BEGIN { $^W = 1 }
-use Test;
-BEGIN { plan tests => 1 }
+use Test::More 'no_plan';
use Config;
use File::Spec;
use lib qw( ../lib lib );
-use B::Keywords qw( @Symbols @Functions @Barewords );
+use B::Keywords ':all';
-my $keywords = File::Spec->catfile( $Config{archlibexp}, 'CORE', 'keywords.h' );
-open FH, "< $keywords\0" or die "Can't open $keywords: $!";
-local $/;
-chomp( my @keywords = <FH> =~ /^\#define \s+ KEY_(\S+) /xmsg );
-close FH;
+# Translate control characters into ^A format
+# Leave others alone.
+my @control_map = (undef, "A".."Z");
+sub _map_control_char {
+ my $char = shift;
+ my $ord = ord $char;
-my %covered;
- at covered{ @Symbols } = ();
- at covered{ @Functions } = ();
- at covered{ @Barewords } = ();
+ return "^".$control_map[$ord] if $ord <= 26;
+ return $char;
+}
-my @missing = grep { ! exists $covered{$_} } @keywords;
+# Test everything in keywords.h is covered.
+{
+ my $keywords = File::Spec->catfile( $Config{archlibexp}, 'CORE', 'keywords.h' );
+ open FH, "< $keywords\0" or die "Can't open $keywords: $!";
+ local $/;
+ chomp( my @keywords = <FH> =~ /^\#define \s+ KEY_(\S+) /xmsg );
+ close FH;
-ok( ! @missing );
-if ( @missing ) {
- diag( "Missing: @missing" );
+ my %covered = map { $_ => 1 } @Symbols, @Barewords;
+
+ for my $keyword (@keywords) {
+ ok $covered{$keyword}, "keyword: $keyword";
+ }
}
+
+
+# Test all the single character globals in main
+{
+ my @globals = map { _map_control_char($_) }
+ grep { length $_ == 1 and /\W/ }
+ keys %main::;
+
+ my %symbols = map { s/^.//; $_ => 1 } (@Scalars, @Arrays, @Hashes);
+ for my $global (@globals) {
+ ok $symbols{$global}, "global: $global";
+ }
+}
More information about the Pkg-perl-cvs-commits
mailing list