r6608 - in /trunk/libb-keywords-perl: ./ Changes LICENSE MANIFEST META.yml Makefile.PL README lib/ lib/B/ lib/B/Keywords.pm t/ t/01pod.t t/02pod-coverage.t t/03yaml.t t/04boilerplate.t t/05critic.t t/10basic.t t/11keywords.t

joeyh at users.alioth.debian.org joeyh at users.alioth.debian.org
Wed Aug 15 01:07:27 UTC 2007


Author: joeyh
Date: Wed Aug 15 01:07:26 2007
New Revision: 6608

URL: http://svn.debian.org/wsvn/?sc=1&rev=6608
Log:
initial import

Added:
    trunk/libb-keywords-perl/
    trunk/libb-keywords-perl/Changes
    trunk/libb-keywords-perl/LICENSE
    trunk/libb-keywords-perl/MANIFEST
    trunk/libb-keywords-perl/META.yml
    trunk/libb-keywords-perl/Makefile.PL
    trunk/libb-keywords-perl/README
    trunk/libb-keywords-perl/lib/
    trunk/libb-keywords-perl/lib/B/
    trunk/libb-keywords-perl/lib/B/Keywords.pm
    trunk/libb-keywords-perl/t/
    trunk/libb-keywords-perl/t/01pod.t
    trunk/libb-keywords-perl/t/02pod-coverage.t
    trunk/libb-keywords-perl/t/03yaml.t
    trunk/libb-keywords-perl/t/04boilerplate.t
    trunk/libb-keywords-perl/t/05critic.t
    trunk/libb-keywords-perl/t/10basic.t
    trunk/libb-keywords-perl/t/11keywords.t

Added: trunk/libb-keywords-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/Changes?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/Changes (added)
+++ trunk/libb-keywords-perl/Changes Wed Aug 15 01:07:26 2007
@@ -1,0 +1,38 @@
+Revision history for Perl extension B::Keywords.
+
+0.01  Mar 21, 2003
+  - original version; created by h2xs 1.5 with options
+    -X -P -n B::Keywords
+0.02  Mar 24, 2003
+  - Added Makefile.PL wrapper for Build.PL
+  - Added $a and $b to @Symbols
+0.03  Jul  4, 2003
+  - Fixed formatting
+  - (probably made some other changes I now forget)
+0.04 Jul  8, 2003
+  - Added tests per Josts K's request
+  - Added 'use 5.006' because this isn't coded for pre 5.6
+0.05 Jul  8 2003
+  - Added the test and license file to MANIFEST so it actually gets packaged
+    and doesn't just stay in my CVS directory. Boy am I dork.
+0.06 Aug  7, 2003
+  - 5.005_03 compatible.
+  - Added SIGNATURE
+1.00 Dec 29, 2005
+  - Added keywords for 5.10
+  - More tests
+1.01 Jan 22, 2006
+  - Added some variables from 5.10
+  - Stuff is exportable now
+1.02 Jul 7, 2006
+  - Added test to watch CORE/keywords.h for new stuff
+  - Added -x and state to @Functions.
+1.03 Aug 17, 2006
+  - Separated non-functions in @Functions to @Barewords
+  - Used qw() lists
+1.04 Aug 17, 2006
+  - Fixed syntax bugx in 1.03
+1.05 Nov 24, 2006
+  - Added UNITCHECK
+1.07 Feb 14, 2007
+  - Added EQ GE GT NE LE LT for 5.6.

Added: trunk/libb-keywords-perl/LICENSE
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/LICENSE?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/LICENSE (added)
+++ trunk/libb-keywords-perl/LICENSE Wed Aug 15 01:07:26 2007
@@ -1,0 +1,9 @@
+Copyright 2003, Joshua b. Jore. All rights reserved.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of either:
+
+a) the GNU General Public License as published by the Free Software
+   Foundation; version 2, or
+
+b) the "Artistic License" which comes with Perl.

Added: trunk/libb-keywords-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/MANIFEST?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/MANIFEST (added)
+++ trunk/libb-keywords-perl/MANIFEST Wed Aug 15 01:07:26 2007
@@ -1,0 +1,14 @@
+Changes
+lib/B/Keywords.pm
+LICENSE
+Makefile.PL
+MANIFEST			This list of files
+META.yml
+README
+t/01pod.t
+t/02pod-coverage.t
+t/03yaml.t
+t/04boilerplate.t
+t/05critic.t
+t/10basic.t
+t/11keywords.t

Added: trunk/libb-keywords-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/META.yml?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/META.yml (added)
+++ trunk/libb-keywords-perl/META.yml Wed Aug 15 01:07:26 2007
@@ -1,0 +1,13 @@
+--- #YAML:1.0
+name:                B-Keywords
+version:             1.06
+abstract:            Lists of reserved barewords and symbol names
+license:             ~
+generated_by:        ExtUtils::MakeMaker version 6.31
+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>

Added: trunk/libb-keywords-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/Makefile.PL?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/Makefile.PL (added)
+++ trunk/libb-keywords-perl/Makefile.PL Wed Aug 15 01:07:26 2007
@@ -1,0 +1,10 @@
+#!perl -w
+# $Id: /src/B-Keywords/trunk/Makefile.PL 189 2006-08-17T14:36:23.798783Z josh  $
+
+use ExtUtils::MakeMaker;
+WriteMakefile(
+    'NAME'          => 'B::Keywords',
+    'VERSION_FROM'  => 'lib/B/Keywords.pm',
+    'ABSTRACT_FROM' => 'lib/B/Keywords.pm',
+    'AUTHOR'        => 'Joshua ben Jore <jjore at cpan.org>',
+);

Added: trunk/libb-keywords-perl/README
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/README?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/README (added)
+++ trunk/libb-keywords-perl/README Wed Aug 15 01:07:26 2007
@@ -1,0 +1,34 @@
+NAME
+    B::Keywords - Lists of reserved barewords and symbol names
+
+SYNOPSIS
+      use B::Keywords;
+      print join "\n", @B::Keywords::Symbols,
+                       @B::Keywords::Barewords;
+
+DESCRIPTION
+    B::Keywords supplies seven arrays of keywords: @Scalars, @Arrays,
+    @Hashes, @Filehandles, @Symbols, @Functions and @Barewords. The @Symbols
+    array includes the contents of each of @Scalars, @Arrays, @Hashes and
+    @Filehandles. Similarly, @Barewords adds a few non-function keywords
+    (like __DATA__, NULL) to the @Functions array.
+
+    All additions and modifications are welcome.
+
+SEE ALSO
+    keywords.pl from the perl source, perlvar, perlfunc, perldelta.
+
+AUTHOR
+    Joshua ben Jore <jjore at cpan.org>
+
+COPYRIGHT AND LICENSE
+    Copyright 2007, Joshua ben Jore. All rights reserved.
+
+    This program is free software; you can redistribute it and/or modify it
+    under the terms of either:
+
+    a) the GNU General Public License as published by the Free Software
+    Foundation; version 2, or
+
+    b) the "Artistic License" which comes with Perl.
+

Added: trunk/libb-keywords-perl/lib/B/Keywords.pm
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/lib/B/Keywords.pm?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/lib/B/Keywords.pm (added)
+++ trunk/libb-keywords-perl/lib/B/Keywords.pm Wed Aug 15 01:07:26 2007
@@ -1,0 +1,468 @@
+## no critic (PodSections,UseWarnings,Interpolation,EndWithOne,NoisyQuotes)
+# $Id: /src/B-Keywords/trunk/lib/B/Keywords.pm 30165 2007-02-14T17:19:30.874598Z josh  $
+
+package B::Keywords;
+
+use strict;
+
+require Exporter;
+*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 );
+
+use vars '$VERSION';
+$VERSION = '1.06';
+
+use vars '@Scalars';
+ at Scalars = (
+    qw( $a
+        $b
+        $_ $ARG
+        $& $MATCH
+        $` $PREMATCH
+        $' $POSTMATCH
+        $+ $LAST_PAREN_MATCH
+        $* $MULTILINE_MATCHING
+        $. $INPUT_LINE_NUMBER $NR
+        $/ $INPUT_RECORD_SEPARATOR $RS
+        $| $OUTPUT_AUTO_FLUSH ), '$,', qw( $OUTPUT_FIELD_SEPARATOR $OFS
+        $OUTPUT_RECORD_SEPARATOR $ORS
+        $" $LIST_SEPARATOR
+        $; $SUBSCRIPT_SEPARATOR $SUBSEP
+        ), '$#', qw( $OFMT
+        $% $FORMAT_PAGE_NUMBER
+        $= $FORMAT_LINES_PER_PAGE
+        $- $FORMAT_LINES_LEFT
+        $~ $FORMAT_NAME
+        $^ $FORMAT_TOP_NAME
+        $: $FORMAT_LINE_BREAK_CHARACTERS
+        $? $CHILD_ERROR $^CHILD_ERROR_NATIVE
+        $! $ERRNO $OS_ERROR
+        $@ $EVAL_ERROR
+        $$ $PROCESS_ID $PID
+        $< $REAL_USER_ID $UID
+        $> $EFFECTIVE_USER_ID $EUID ), '$(', qw( $REAL_GROUP_ID $GID ), '$)',
+    qw(
+        $EFFECTIVE_GROUP_ID $EGID
+        $0 $PROGRAM_NAME
+        $[
+        $]
+        $^A $ACCUMULATOR
+        $^C $COMPILING
+        $^D $DEBUGGING
+        $^E $EXTENDED_OS_ERROR
+        $^ENCODING
+        $^F $SYSTEM_FD_MAX
+        $^H
+        $^I $INPLACE_EDIT
+        $^L $FORMAT_FORMFEED
+        $^M
+        $^N
+        $^O $OSNAME
+        $^OPEN
+        $^P $PERLDB
+        $^R $LAST_REGEXP_CODE_RESULT
+        $^RE_DEBUG_FLAGS
+        $^RE_TRIE_MAXBUF
+        $^S $EXCEPTIONS_BEING_CAUGHT
+        $^T $BASETIME
+        $^TAINT
+        $^UNICODE
+        $^UTF8LOCALE
+        $^V $PERL_VERSION
+        $^W $WARNING $^WARNING_BITS
+        $^WIDE_SYSTEM_CALLS
+        $^X $EXECUTABLE_NAME
+        $ARGV
+        ),
+);
+
+use vars '@Arrays';
+ at Arrays = qw(
+    @+ $LAST_MATCH_END
+    @- @LAST_MATCH_START
+    @ARGV
+    @INC
+    @_
+);
+
+use vars '@Hashes';
+ at Hashes = qw(
+    %OVERLOAD
+    %!
+    %^H
+    %INC
+    %ENV
+    %SIG
+);
+
+use vars '@Filehandles';
+ at Filehandles = qw(
+    *ARGV ARGV
+    ARGVOUT
+    STDIN
+    STDOUT
+    STDERR
+);
+
+use vars '@Functions';
+ at Functions = qw(
+    AUTOLOAD
+    BEGIN
+    DESTROY
+    END
+    INIT
+    CHECK
+    UNITCHECK
+    abs
+    accept
+    alarm
+    atan2
+    bind
+    binmode
+    bless
+    break
+    caller
+    chdir
+    chmod
+    chomp
+    chop
+    chown
+    chr
+    chroot
+    close
+    closedir
+    connect
+    cos
+    crypt
+    dbmclose
+    dbmopen
+    defined
+    delete
+    die
+    dump
+    each
+    endgrent
+    endhostent
+    endnetent
+    endprotoent
+    endpwent
+    endservent
+    eof
+    eval
+    exec
+    exists
+    exit
+    fcntl
+    fileno
+    flock
+    fork
+    format
+    formline
+    getc
+    getgrent
+    getgrgid
+    getgrnam
+    gethostbyaddr
+    gethostbyname
+    gethostent
+    getlogin
+    getnetbyaddr
+    getnetbyname
+    getnetent
+    getpeername
+    getpgrp
+    getppid
+    getpriority
+    getprotobyname
+    getprotobynumber
+    getprotoent
+    getpwent
+    getpwnam
+    getpwuid
+    getservbyname
+    getservbyport
+    getservent
+    getsockname
+    getsockopt
+    glob
+    gmtime
+    goto
+    grep
+    hex
+    index
+    int
+    ioctl
+    join
+    keys
+    kill
+    last
+    lc
+    lcfirst
+    length
+    link
+    listen
+    local
+    localtime
+    log
+    lstat
+    map
+    mkdir
+    msgctl
+    msgget
+    msgrcv
+    msgsnd
+    my
+    next
+    not
+    oct
+    open
+    opendir
+    ord
+    our
+    pack
+    pipe
+    pop
+    pos
+    print
+    printf
+    prototype
+    push
+    quotemeta
+    rand
+    read
+    readdir
+    readline
+    readlink
+    readpipe
+    recv
+    redo
+    ref
+    rename
+    require
+    reset
+    return
+    reverse
+    rewinddir
+    rindex
+    rmdir
+    say
+    scalar
+    seek
+    seekdir
+    select
+    semctl
+    semget
+    semop
+    send
+    setgrent
+    sethostent
+    setnetent
+    setpgrp
+    setpriority
+    setprotoent
+    setpwent
+    setservent
+    setsockopt
+    shift
+    shmctl
+    shmget
+    shmread
+    shmwrite
+    shutdown
+    sin
+    sleep
+    socket
+    socketpair
+    sort
+    splice
+    split
+    sprintf
+    sqrt
+    srand
+    stat
+    state
+    study
+    substr
+    symlink
+    syscall
+    sysopen
+    sysread
+    sysseek
+    system
+    syswrite
+    tell
+    telldir
+    tie
+    tied
+    time
+    times
+    truncate
+    uc
+    ucfirst
+    umask
+    undef
+    unlink
+    unpack
+    unshift
+    untie
+    use
+    utime
+    values
+    vec
+    wait
+    waitpid
+    wantarray
+    warn
+    write
+
+    -r -w -x -o
+    -R -W -X -O -e -z -s
+    -f -d -l -p -S -b -c -t
+    -u -g -k
+    -T -B
+    -M -A -C
+);
+
+use vars '@Barewords';
+ at Barewords = qw(
+    __FILE__
+    __LINE__
+    __PACKAGE__
+    __DATA__
+    __END__
+    CORE
+    EQ
+    GE
+    GT
+    LE
+    LT
+    NE
+    NULL
+    and
+    cmp
+    continue
+    default
+    do
+    else
+    elsif
+    eq
+    err
+    exp
+    for
+    foreach
+    ge
+    given
+    gt
+    if
+    le
+    lock
+    lt
+    m
+    ne
+    no
+    or
+    package
+    q
+    qq
+    qr
+    qw
+    qx
+    s
+    sub
+    tr
+    unless
+    until
+    when
+    while
+    x
+    xor
+    y
+);
+
+use vars '@Symbols';
+ at Symbols = ( @Scalars, @Arrays, @Hashes, @Filehandles, @Functions );
+
+# This quote is blatantly copied from ErrantStory.com, Michael Poe's
+# comic.
+"You know, when you stop and think about it, Cthulhu is a bit a Mary Sue isn't he?"
+
+__END__
+
+=head1 NAME
+
+B::Keywords - Lists of reserved barewords and symbol names
+
+=head1 SYNOPSIS
+
+  use B::Keywords qw( @Symbols Barewords );
+  print join "\n", @Symbols,
+                   @Barewords;
+
+=head1 DESCRIPTION
+
+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>.
+Similarly, C<@Barewords> adds a few non-function keywords and
+operators to the C<@Functions> array.
+
+All additions and modifications are welcome.
+
+=head1 DATA
+
+=over
+
+=item C<@Scalars>
+
+=item C<@Arrays>
+
+=item C<@Hashes>
+
+=item C<@Filehandles>
+
+=item C<@Functions>
+
+The above are lists of variables, special file handles, and built in
+functions.
+
+=item C<@Symbols>
+
+This is just the combination of all of the above: variables, file
+handles, and functions.
+
+=item C<@Barewords>
+
+This is a list of other special keywords in perl including operators
+and all the control structures.
+
+=back
+
+=head1 EXPORT
+
+Anything can be exported if you desire. Use the :all tag to get
+everything.
+
+=head1 SEE ALSO
+
+keywords.pl from the perl source, L<perlvar>, L<perlfunc>,
+L<perldelta>.
+
+=head1 AUTHOR
+
+Joshua ben Jore <jjore at cpan.org>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2007, Joshua ben Jore. All rights reserved.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of either:
+
+a) the GNU General Public License as published by the Free Software
+   Foundation; version 2, or
+
+b) the "Artistic License" which comes with Perl.

Added: trunk/libb-keywords-perl/t/01pod.t
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/t/01pod.t?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/t/01pod.t (added)
+++ trunk/libb-keywords-perl/t/01pod.t Wed Aug 15 01:07:26 2007
@@ -1,0 +1,12 @@
+#!perl
+# $Id: /src/B-Keywords/trunk/t/01pod.t 188 2006-08-17T14:35:42.213094Z josh  $
+use Test::More;
+
+if ( not $ENV{AUTHOR_TESTS} ) {
+    plan skip_all => 'Skipping author tests';
+}
+else {
+    eval "use Test::Pod 1.14";
+    die $@ if $@;
+    all_pod_files_ok();
+}

Added: trunk/libb-keywords-perl/t/02pod-coverage.t
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/t/02pod-coverage.t?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/t/02pod-coverage.t (added)
+++ trunk/libb-keywords-perl/t/02pod-coverage.t Wed Aug 15 01:07:26 2007
@@ -1,0 +1,13 @@
+#!perl
+# $Id: /src/B-Keywords/trunk/t/02pod-coverage.t 188 2006-08-17T14:35:42.213094Z josh  $
+use Test::More;
+
+if ( not $ENV{AUTHOR_TESTS} ) {
+    plan skip_all => 'Skipping author tests';
+}
+else {
+    eval "use Test::Pod::Coverage 1.04";
+    die $@ if $@;
+
+    all_pod_coverage_ok();
+}

Added: trunk/libb-keywords-perl/t/03yaml.t
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/t/03yaml.t?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/t/03yaml.t (added)
+++ trunk/libb-keywords-perl/t/03yaml.t Wed Aug 15 01:07:26 2007
@@ -1,0 +1,14 @@
+#!perl
+# $Id: /src/B-Keywords/trunk/t/03yaml.t 188 2006-08-17T14:35:42.213094Z josh  $
+use Test::More;
+
+if ( not $ENV{AUTHOR_TESTS} ) {
+    plan skip_all => 'Skipping author tests';
+}
+else {
+    plan tests => 1;
+    require YAML;
+    YAML->import('LoadFile');
+
+    ok( LoadFile("META.yml") );
+}

Added: trunk/libb-keywords-perl/t/04boilerplate.t
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/t/04boilerplate.t?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/t/04boilerplate.t (added)
+++ trunk/libb-keywords-perl/t/04boilerplate.t Wed Aug 15 01:07:26 2007
@@ -1,0 +1,55 @@
+#!perl
+# $Id: /src/B-Keywords/trunk/t/04boilerplate.t 188 2006-08-17T14:35:42.213094Z josh  $
+use Test::More;
+
+if ( not $ENV{AUTHOR_TESTS} ) {
+    plan skip_all => 'Skipping author tests';
+}
+else {
+    plan tests => 3;
+
+    not_in_file_ok(
+        README                      =>
+            "The README is used..." => qr/The README is used/,
+        "'version information here'" => qr/to provide version information/,
+    );
+
+    not_in_file_ok( Changes => "placeholder date/time" => qr(Date/time) );
+
+    module_boilerplate_ok('lib/B/Keywords.pm');
+}
+
+sub not_in_file_ok {
+    my ( $filename, %regex ) = @_;
+    open my $fh, "<", $filename
+        or die "couldn't open $filename for reading: $!";
+
+    my %violated;
+
+    while ( my $line = <$fh> ) {
+        while ( my ( $desc, $regex ) = each %regex ) {
+            if ( $line =~ $regex ) {
+                push @{ $violated{$desc} ||= [] }, $.;
+            }
+        }
+    }
+
+    if (%violated) {
+        fail("$filename contains boilerplate text");
+        diag "$_ appears on lines @{$violated{$_}}" for keys %violated;
+    }
+    else {
+        pass("$filename contains no boilerplate text");
+    }
+}
+
+sub module_boilerplate_ok {
+    my ($module) = @_;
+    not_in_file_ok(
+        $module                         =>
+            'the great new $MODULENAME' => qr/ - The great new /,
+        'boilerplate description'  => qr/Quick summary of what the module/,
+        'stub function definition' => qr/function[12]/,
+    );
+}
+

Added: trunk/libb-keywords-perl/t/05critic.t
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/t/05critic.t?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/t/05critic.t (added)
+++ trunk/libb-keywords-perl/t/05critic.t Wed Aug 15 01:07:26 2007
@@ -1,0 +1,12 @@
+#!perl
+# $Id: /src/B-Keywords/trunk/t/05critic.t 188 2006-08-17T14:35:42.213094Z josh  $
+use Test::More;
+
+if ( not $ENV{AUTHOR_TESTS} ) {
+    plan skip_all => 'Skipping author tests';
+}
+else {
+    require Test::Perl::Critic;
+    Test::Perl::Critic->import( -severity => 1 );
+    all_critic_ok();
+}

Added: trunk/libb-keywords-perl/t/10basic.t
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/t/10basic.t?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/t/10basic.t (added)
+++ trunk/libb-keywords-perl/t/10basic.t Wed Aug 15 01:07:26 2007
@@ -1,0 +1,26 @@
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl 1.t'
+
+#########################
+
+# change 'tests => 1' to 'tests => last_test_to_print';
+
+use Test;
+
+BEGIN {
+    plan( tests => 7 );
+    $^W = 1;
+}
+use lib qw( ../lib lib );
+use B::Keywords;
+
+#########################
+
+ok( scalar @B::Keywords::Scalars );
+ok( scalar @B::Keywords::Arrays );
+ok( scalar @B::Keywords::Hashes );
+ok( scalar @B::Keywords::Filehandles );
+ok( scalar @B::Keywords::Symbols );
+ok( scalar @B::Keywords::Functions );
+ok( scalar @B::Keywords::Barewords );
+

Added: trunk/libb-keywords-perl/t/11keywords.t
URL: http://svn.debian.org/wsvn/trunk/libb-keywords-perl/t/11keywords.t?rev=6608&op=file
==============================================================================
--- trunk/libb-keywords-perl/t/11keywords.t (added)
+++ trunk/libb-keywords-perl/t/11keywords.t Wed Aug 15 01:07:26 2007
@@ -1,0 +1,27 @@
+use strict;
+BEGIN { $^W = 1 }
+use Test;
+BEGIN { plan tests => 1 }
+
+use Config;
+use File::Spec;
+use lib qw( ../lib lib );
+use B::Keywords qw( @Symbols @Functions @Barewords );
+
+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;
+
+my %covered;
+ at covered{ @Symbols } = ();
+ at covered{ @Functions } = ();
+ at covered{ @Barewords } = ();
+
+my @missing = grep { ! exists $covered{$_} } @keywords;
+
+ok( ! @missing );
+if ( @missing ) {
+    diag( "Missing: @missing" );
+}




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