B-Keywords-1.27/0000755000175000017500000000000014625056601013002 5ustar rurbanrurbanB-Keywords-1.27/META.yml0000664000175000017500000000122714625056601014257 0ustar rurbanrurban--- abstract: 'Lists of reserved barewords and symbol names' author: - 'Reini Urban ' build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010' license: unknown meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: B-Keywords no_index: directory: - t - inc requires: B: '0' resources: license: http://dev.perl.org/licenses/ repository: http://github.com/rurban/b-keywords version: '1.27' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' B-Keywords-1.27/SIGNATURE0000664000175000017500000000476714625056601014306 0ustar rurbanrurbanThis file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.88. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 SHA256 733d149a962171f2a9fb209a135b290eabc56a64c7299089128bd0036bfd2a33 Changes SHA256 6724a85e9820d3b08909b518d4d3d3621cf2fb7f2876360e5b2874efbf8c2ee8 LICENSE SHA256 7ebf58443f98897bc4d14d25de111e89838c847102bfafd98cad2ab6de7e7177 MANIFEST SHA256 532a8516e5a64202edf71787167972cbca427aa1093c78d2fe5fee082f37a67d META.json SHA256 59aeac57d431dcde16fda0a2f7e30d8869dc1ad30f8dbc9fbac755e5541a469b META.yml SHA256 86f4e45ac726b4ecf0a1cec637e3aed4a9a8b6dd278139cadcedd84b1ae96bf5 Makefile.PL SHA256 33a0ad7e2d9d3e3c93376b42931c1a32be3c0554a4e3b98f05090b92d3b250cc README SHA256 460cff0d7b11a65812c01db4ac3fc84528fe11093c4d956c8dc903bad915731f lib/B/Keywords.pm SHA256 e03c8fcbca5ea500346882132d9a4ae57fc8fca37bdf2a8e0576f25408760885 t/10basic.t SHA256 286d511b3ed591a65cf64ce4bd58aae9f3d91888bb094c7e8e87a2c7cedc7c80 t/11keywords.t SHA256 8ad1a0eed9a7f8b064d08d704334bd64d9759ac3d470c32380bd8f229ed47584 t/export.t SHA256 6aa4dd8133ae0d11b0220796801c955746a7d891aed8bfc7056b7e0e7433929d t/z_kwalitee.t SHA256 fb00e0e0d57de606699706d2a2e486df05d840793d3bcf6e4bb13f1604f19487 t/z_meta.t SHA256 956f858cc6c609d57ad5f92b6432a40c9c3d90576c397f90afa4489d12030850 t/z_perl_minimum_version.t SHA256 0ba22336dc34b370d0fa7a0d87ed45080d76e87d6a409881f9402277d66a13e4 t/z_pod-coverage.t SHA256 29178b45bc6c8cfe6d031f2c054ff9af721c2fc915ff82f5362ac66cdac26718 t/z_pod.t -----BEGIN PGP SIGNATURE----- iQGzBAEBAwAdFiEEOKQWew22nknF9yFsuMKIZqsnp6IFAmZUXYEACgkQuMKIZqsn p6KGewwA4O9J5LR5SVRSd0Z4ihoOyfPuuAkNlpuFXEkRJj6AgjkJ1GLq1w/wpPxw 4fIWXuirq55ykn6N0u3cDfji34ldJ0y3BaHV5MIkyzHLqfuyg42/2ejXlAKlKepO +8fF/hGKbNy7W/l44khMrq/IaaLe5kSOQPF1StNcaxMTUKZlUMeSmVQ3oTnpJMm2 VLO0UbNCbgkG55zgRV+rTbeImDYvHDGKcI2VbtblP2WEKBMJxxahKpcghm4otDN9 Iw2FIdf9eJApcrrprxrpjAQhR8ogCzTorC5nYJOso3BLdQ08rDNnVyrIdIg7Ot7A Uv0MA1KhPr3IaBez0OlJ+ncjciHYfc812Xwy4wRzoApVLYzxx/jgziYx12BKYTkr N8GKNY6iIBQ3HY2sLm45F/mevk1keCS7pkzWaJTXg2eNAYpLsW5sonkhLk/orUKj SJP++Juy4cW2QM1jObOkbJT78Co56MZqFFH5a6OKvQwzRnpM9A+kzwktidRwqCHE tkLgNvUV =ltgY -----END PGP SIGNATURE----- B-Keywords-1.27/MANIFEST0000644000175000017500000000070614625056601014136 0ustar rurbanrurbanChanges lib/B/Keywords.pm LICENSE Makefile.PL MANIFEST This list of files README t/10basic.t t/11keywords.t t/export.t t/z_kwalitee.t t/z_meta.t t/z_perl_minimum_version.t t/z_pod-coverage.t t/z_pod.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) SIGNATURE Public-key signature (added by MakeMaker) B-Keywords-1.27/README0000644000175000017500000000745214625056133013672 0ustar rurbanrurbanNAME B::Keywords - Lists of reserved barewords and symbol names SYNOPSIS use B::Keywords qw( @Symbols @Barewords ); print join "\n", @Symbols, @Barewords; DESCRIPTION "B::Keywords" supplies several arrays of exportable keywords: @Scalars, @Arrays, @Hashes, @Filehandles, @Symbols, @Functions, @Barewords, @BarewordsExtra, @TieIOMethods, @UNIVERSALMethods and @ExporterSymbols. The @Symbols array includes the contents of each of @Scalars, @Arrays, @Hashes, @Functions and @Filehandles. Similarly, @Barewords adds a few non-function keywords and operators to the @Functions array. @BarewordsExtra adds a few barewords which are not in keywords.h. All additions and modifications are welcome. The perl parser uses a static list of keywords from regen/keywords.pl which constitutes the strict list of keywords @Functions and @Barewords, though some @Functions are not functions in the strict sense. Several library functions use more special symbols, handles and methods. DATA @Scalars @Arrays @Hashes @Filehandles @Functions The above are lists of variables, special file handles, and built in functions. @Symbols This is just the combination of all of the above: variables, file handles, and functions. @Barewords This is a list of other special keywords in perl including operators and all the control structures. @BarewordsExtra This is a list of barewords which are missing from keywords.h, handled extra in the tokenizer. @TieIOMethods Those are special tie or PerlIO methods called by the perl core, namely for tieing or PerlIO::via (or both of those) or threads. @UNIVERSALMethods Methods defined by the core package UNIVERSAL. @ExporterSymbols Variables or functions used by Exporter (some internal), which is almost as good as being keywords, for you mustn't use them for any other purpose in any package that isa Exporter, which is quite common. EXPORT Anything can be exported if you desire. Use the :all tag to get everything. SEE ALSO regen/keywords.pl from the perl source, perlvar, perlfunc, perldelta. BUGS Please report any bugs or feature requests to "bug-B-Keywords at rt.cpan.org", or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT You can find documentation for this module with the perldoc command. perldoc B::Keywords You can also look for information at: * RT: CPAN's request tracker * GIT repository * AnnoCPAN: Annotated CPAN documentation * CPAN Ratings * Search CPAN ACKNOWLEDGEMENTS Michael G Schwern, Reini Urban, Florian Ragwitz and Zsbán Ambrus for patches and releases. COPYRIGHT AND LICENSE Copyright 2009 Joshua ben Jore, All rights reserved. Copyright 2013, 2015, 2017-2021 Reini Urban, 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. SOURCE AVAILABILITY This source is in Github: AUTHOR Joshua ben Jore MAINTAINER Reini Urban B-Keywords-1.27/LICENSE0000644000175000017500000000045414625056133014012 0ustar rurbanrurbanCopyright 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.B-Keywords-1.27/Makefile.PL0000644000175000017500000000165514625056133014763 0ustar rurbanrurban#!perl -w use ExtUtils::MakeMaker; WriteMakefile( 'NAME' => 'B::Keywords', 'VERSION_FROM' => 'lib/B/Keywords.pm', 'ABSTRACT_FROM' => 'lib/B/Keywords.pm', 'AUTHOR' => 'Reini Urban ', 'SIGN' => 1, 'PREREQ_PM' => { 'B' => 0, }, depend => { 'README' => 'lib/B/Keywords.pm' }, ($ExtUtils::MakeMaker::VERSION gt '6.46' ? ('META_MERGE' => { resources => { repository => 'http://github.com/rurban/b-keywords', license => 'http://dev.perl.org/licenses/', bugtracker => { web => 'https://github.com/rurban/b-keywords/issues', }, }, } ) : ()), ); package MY; use Config; sub depend { " README : \$(VERSION_FROM) pod2text \$(VERSION_FROM) > README release : dist git tag \$(VERSION) cpan-upload \$(DISTVNAME).tar\$(SUFFIX) git push git push --tags " } B-Keywords-1.27/META.json0000664000175000017500000000213214625056601014423 0ustar rurbanrurban{ "abstract" : "Lists of reserved barewords and symbol names", "author" : [ "Reini Urban " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010", "license" : [ "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "B-Keywords", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "B" : "0" } } }, "release_status" : "stable", "resources" : { "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "url" : "http://github.com/rurban/b-keywords" } }, "version" : "1.27", "x_serialization_backend" : "JSON::PP version 4.16" } B-Keywords-1.27/t/0000755000175000017500000000000014625056601013245 5ustar rurbanrurbanB-Keywords-1.27/t/z_pod.t0000644000175000017500000000031514625056133014544 0ustar rurbanrurban# -*- perl -*- use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; plan skip_all => "5.8 required for =encoding" if $] < 5.008; all_pod_files_ok(); B-Keywords-1.27/t/10basic.t0000644000175000017500000000114314625056133014653 0ustar rurbanrurban# 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 ); B-Keywords-1.27/t/export.t0000644000175000017500000000036314625056133014755 0ustar rurbanrurban# -*- perl -*- use warnings; use strict; use Test::More tests => 7; use B::Keywords ":all"; for my $name (qw(Scalars Arrays Hashes Filehandles Symbols Functions Barewords)) { no strict 'refs'; ok @{$name}, ":all exports \@$name"; } B-Keywords-1.27/t/z_kwalitee.t0000644000175000017500000000146714625056133015600 0ustar rurbanrurban# -*- perl -*- use strict; use warnings; use Test::More; use Config; plan skip_all => 'requires Perl 5.8.2' if $] < 5.008002; plan skip_all => 'This test is only run for the module author' unless -d '.git' || $ENV{IS_MAINTAINER}; # Missing XS dependencies are usually not caught by EUMM # And they are usually only XS-loaded by the importer, not require. for (qw( Class::XSAccessor Text::CSV_XS List::MoreUtils )) { eval "use $_;"; plan skip_all => "$_ required for Test::Kwalitee" if $@; } eval "require Test::Kwalitee;"; plan skip_all => "Test::Kwalitee required" if $@; plan skip_all => 'Test::Kwalitee fails with clang -faddress-sanitizer' if $Config{ccflags} =~ /-faddress-sanitizer/; use File::Copy 'cp'; cp('MYMETA.yml','META.yml') if -e 'MYMETA.yml' and !-e 'META.yml'; Test::Kwalitee->import; B-Keywords-1.27/t/z_meta.t0000644000175000017500000000127614625056133014717 0ustar rurbanrurban# -*- perl -*- # Test that our META.yml file matches the current specification. use strict; BEGIN { $| = 1; $^W = 1; } my $MODULE = 'Test::CPAN::Meta 0.12'; # Don't run tests for installs use Test::More; use Config; plan skip_all => 'This test is only run for the module author' unless -d '.git' || $ENV{IS_MAINTAINER}; plan skip_all => 'Test::CPAN::Meta fails with clang -faddress-sanitizer' if $Config{ccflags} =~ /-faddress-sanitizer/; # Load the testing module eval "use $MODULE;"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); die "Failed to load required release-testing module $MODULE 0.12" if -d '.git' || $ENV{IS_MAINTAINER}; } meta_yaml_ok(); B-Keywords-1.27/t/z_perl_minimum_version.t0000644000175000017500000000126514625056133020231 0ustar rurbanrurban# -*- perl -*- # Test that our declared minimum Perl version matches our syntax use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Perl::MinimumVersion 1.20', 'Test::MinimumVersion 0.008', ); # Don't run tests during end-user installs use Test::More; unless (-d '.git' || $ENV{IS_MAINTAINER}) { plan( skip_all => "Author tests not required for installation" ); } # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); die "Failed to load required release-testing module $MODULE" if -d '.git' || $ENV{IS_MAINTAINER}; } } all_minimum_version_ok("5.006"); 1; B-Keywords-1.27/t/11keywords.t0000644000175000017500000000736114625056133015452 0ustar rurbanrurban# -*- perl -*- use warnings; use strict; use Test::More 'no_plan'; use Config; use File::Spec; use lib qw( ../lib lib ); use B::Keywords ':all'; BEGIN { if (defined &Test::More::note) { *diag = *Test::More::note; } } # 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; return "^".$control_map[$ord] if $ord <= 26; return $char; } sub kopen { my @files = (); # this is the default location for 'kewords.h', unless we're on macOS push @files, File::Spec->catfile( $Config{archlibexp}, 'CORE', 'keywords.h' ); # Apple has restructured it's file system, if we're on macOS and the above # doesn't exist, we're probably using system perl. try an alternate location # via Apple's tools if ($^O eq "darwin" && $Config{archlibexp} =~ m!^/System/Library/Perl!) { my $p = ''; $p = qx/xcrun --show-sdk-path/; chomp $p; push @files, File::Spec->catdir($p, $files[0]); } # return the first FH we can open from the list above. 99.44% of # the time it's going to be the first (and correct) one for my $file (@files) { if (open my $fh, "<", $file) { return $fh; } } # if we're here something else happend or apple is up to new tricks die "Can't open any of @files"; } # Test everything in keywords.h is covered. { # get a filehandle to 'keywords.h' my $fh = kopen(); local $/; chomp( my @keywords = <$fh> =~ /^\#define \s+ KEY_(\S+) /xmsg ); close $fh; my $usedevel = $Config{usedevel}; my %covered = map { $_ => 1 } @Symbols, @Barewords; diag "check if all keywords.h have \@Symbols or \@Barewords"; TODO: { for my $keyword (@keywords) { local $TODO = "old blead version, wait for the release" if $Config{usedevel} && !$covered{$keyword}; ok $covered{$keyword}, "keyword: $keyword"; } } diag "reverse: check if all \@Symbols and \@Barewords are in keywords.h"; my %keyword = map { $_ => 1 } @keywords; TODO: { for my $key (@Barewords, @Functions) { if ($key =~ /^-/ or $key eq 'err') { # skip file test ops, err fails my tests diag "not in keywords.h: $key. skipped"; } else { local $TODO = "old blead version, wait for the release" if $Config{usedevel} && !$keyword{$key}; ok $keyword{$key}, "keywords.h: $key"; } } } } # 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); diag "check if all single-character \@Scalars, \@Arrays, \@Hashes are as globals in \%main::"; for my $global (@globals) { ok $symbols{$global}, "global: $global"; } #my %globals = map { $_ => 1 } @globals; diag "the reverse is not true as most globals are auto-created"; #for my $sym (grep { length $_ == 1 } keys %symbols) { # ok $globals{$sym}, "\%main:: $sym"; #} } # Cannot test all the other globals in main. They are mostly created on-the-fly. if (0) { my %globals = map { _map_control_char($_) => 1 } grep { length $_ > 1 && $_ !~ /^_import; diag "check if all multi-character \@Scalars, \@Arrays, \@Hashes are as globals in \%main::"; my %symbols = map { s/^[\$\%\@]//; $_ => 1 } (@Scalars, @Arrays, @Hashes); for my $sym (grep { length $_ > 1 } keys %symbols) { ok $globals{$sym}, "\%main:: $sym"; } # and the reverse is troubled by namespace pollution. %main:: contains B, Test, ... } B-Keywords-1.27/t/z_pod-coverage.t0000644000175000017500000000062514625056133016341 0ustar rurbanrurban# -*- perl -*- use strict; use warnings; use Test::More; plan skip_all => 'done_testing requires Test::More 0.88' if Test::More->VERSION < 0.88; plan skip_all => 'This test is only run for the module author' unless -d '.git' || $ENV{IS_MAINTAINER}; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; all_pod_coverage_ok(); B-Keywords-1.27/Changes0000644000175000017500000001114214625056306014276 0ustar rurbanrurbanRevision 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. 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); 1.10 - Fix typo in SYNOPSIS 1.11 rafl - Add new keywords for 5.16, __SUB__ and evalbytes. 1.12 Fri Apr 5 2013 rurban - Add new keyword fc (Unicode casefolding) for 5.16 added with commit 838f2281 - added diag before each big t/11keywords.t loop 1.13 Fri Apr 5 2013 rurban - removed diag before each big t/11keywords.t loop - added suggested keywords from RT #62382: *_ and DATA to @FileHandles (the deprecated lowercase: stdin, stdout, stderr not), import unimport to @Functions, BINMODE CLEAR CLEARERR CLONE CLONE_SKIP CLOSE DELETE EOF ERROR EXISTS EXTEND FDOPEN FETCH FETCHSIZE FILENO FILL FIRSTKEY FLUSH GETC NEXTKEY OPEN POP POPPED PRINT PRINTF PUSH PUSHED READ READLINE SCALAR SEEK SETLINEBUF SHIFT SPLICE STORE STORESIZE SYSOPEN TELL TIEARRAY TIEHANDLE TIEHASH TIESCALAR UNREAD UNSHIFT UNTIE UTF8 WRITE to @TieIOMethods, can isa DOES VERSION to @UNIVERSALMethods, @EXPORT @EXPORT_OK @EXPORT_FAIL @EXPORT_TAGS _push_tags _rebuild_cache as_heavy export export_fail export_fail_in export_ok_tags export_tags export_to_level heavy_export heavy_export_ok_tags heavy_export_tags heavy_export_to_level heavy_require_version require_version to @ExporterSymbols (Zsbán Ambrus) - Moved exp from @Barewords to @Functions - Added $^CHILD_ERROR_NATIVE $^GLOBAL_PHASE $^LAST_FH $^MATCH $^PREMATCH $^POSTMATCH $^UTF8CACHE $^WIN32_SLOPPY_STAT to @Scalars - Added English names for %!, @F (perlrun) and @ARG for @_ (Zsbán Ambrus) - Added %+ %- (Zsbán Ambrus) and $LAST_SUBMATCH_RESULT 1.14 Sat Feb 21 2015 rurban - removed err from Barewords, RT #102259 (Alex Efros a.k.a. Powerman) 1.15 Wed Nov 11 2015 rurban - Fixed $OUTPUT_AUTOFLUSH, RT #108572 (Defragmented Reality) - Made $* $MULTILINE_MATCHING version specific, deprecated with 5.8.1, removed with 5.10 1.16 Thu Dec 28 2017 rurban - Added 5.27.7 changes, RT #123948 - Added cperl class keywords - Added keywords per version back to 5.004 1.17 Mon Jan 29 17:57:05 CET 2018 rurban - Added 5.27.8 changes, whereis/whereso is gone for good. There's still a chance for perl6 compat 1.18 Mon Jan 29 18:09:23 CET 2018 rurban - Oops, forgot break 1.19 Thu Aug 23 11:16:09 CEST 2018 - our was added with 5.005_61 1.20 2019-02-15 11:03:00 rurban - extern was added with 5.29.0c 1.21 2019-12-17 17:38:00 rurban - isa was added with 5.31.7 - improved t/z_kwalitee.t 1.22 2021-02-22 09:42:18 rurban - add try/catch by Tom Wyant 1.23 2021-10-30 12:52:43 rurban - relax bogus blead test failures - add reverse test: if @Barewords are covered on keywords.h - move some @Barewords not in keywords.h to @BarewordsExtra - add %main, %CORE, %CORE::GLOBAL:: to @Hashes - fixed versions for EQ, CORE, state, break, given, when, default, UNITCHECK 1.24 2022-02-21 10:47:08 rurban - Fix for broken /CORE/keywords.h test on system macOS (PR #5, @nega0) - finally added with 5.35.8 (RT #141406) 1.25 2023-06-19 15:16:08 rurban - Add Corinna keywords, new with Perl 5.38.0 (PR #8, @trwyant) ADJUST class field method 1.26 2023-06-19 18:43 rurban - Updated README 1.27 2024-05-27 12:13 rurban - Add bareword __CLASS__ since 5.39.2 B-Keywords-1.27/lib/0000755000175000017500000000000014625056601013550 5ustar rurbanrurbanB-Keywords-1.27/lib/B/0000755000175000017500000000000014625056601013731 5ustar rurbanrurbanB-Keywords-1.27/lib/B/Keywords.pm0000644000175000017500000003116514625056163016107 0ustar rurbanrurban## no critic (PodSections,UseWarnings,Interpolation,EndWithOne,NoisyQuotes) package B::Keywords; use strict; require Exporter; *import = *import = \&Exporter::import; use vars qw( @EXPORT_OK %EXPORT_TAGS ); @EXPORT_OK = qw( @Scalars @Arrays @Hashes @Filehandles @Symbols @Functions @Barewords @TieIOMethods @UNIVERSALMethods @ExporterSymbols ); %EXPORT_TAGS = ( 'all' => \@EXPORT_OK ); use vars '$VERSION'; $VERSION = '1.27'; my $CPERL = $^V =~ /c$/ ? 1 : 0; use vars '@Scalars'; @Scalars = ( qw( $a $b $_ $ARG $& $MATCH $` $PREMATCH $' $POSTMATCH $+ $LAST_PAREN_MATCH ), ($] < 5.008001 ? qw( $* $MULTILINE_MATCHING) : ()), qw( $. $INPUT_LINE_NUMBER $NR $/ $INPUT_RECORD_SEPARATOR $RS $| $OUTPUT_AUTOFLUSH ), '$,', 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 $^CHILD_ERROR_NATIVE $^D $DEBUGGING $^E $EXTENDED_OS_ERROR $^ENCODING $^F $SYSTEM_FD_MAX $^GLOBAL_PHASE $^H $^I $INPLACE_EDIT $^L $FORMAT_FORMFEED $^LAST_FH $^M $^MATCH $^N $LAST_SUBMATCH_RESULT $^O $OSNAME $^OPEN $^P $PERLDB $^PREMATCH $^POSTMATCH $^R $LAST_REGEXP_CODE_RESULT $^RE_DEBUG_FLAGS $^RE_TRIE_MAXBUF $^S $EXCEPTIONS_BEING_CAUGHT $^T $BASETIME $^TAINT $^UNICODE $^UTF8CACHE $^UTF8LOCALE $^V $PERL_VERSION $^W $WARNING $^WARNING_BITS $^WIDE_SYSTEM_CALLS $^WIN32_SLOPPY_STAT $^X $EXECUTABLE_NAME $ARGV ), ); use vars '@Arrays'; @Arrays = qw( @+ $LAST_MATCH_END @- @LAST_MATCH_START @ARGV @F @INC @_ @ARG ); use vars '@Hashes'; @Hashes = qw( %main %CORE %CORE::GLOBAL:: %OVERLOAD %+ %LAST_MATCH_END %- %LAST_MATCH_START %! %OS_ERROR %ERRNO %^H %INC %ENV %SIG ); use vars '@Filehandles'; @Filehandles = qw( *ARGV ARGV *_ _ ARGVOUT DATA STDIN STDOUT STDERR ); use vars '@Functions'; @Functions = ( ($] >= 5.015006 ? qw( __SUB__ ) : ()), qw( AUTOLOAD BEGIN DESTROY END ), # STOP was between 5.5.64 - 5.6.0 ($] >= 5.005064 && $] < 5.006 ? qw(STOP) : qw(CHECK)), # INIT was called RESTART before 5.004_50 ($] >= 5.006 ? qw(INIT) : qw(RESTART)), # removed with 855a8c432447 ($] < 5.007003 ? qw( EQ GE GT LE LT NE ) : ()), ($] >= 5.009005 ? qw( UNITCHECK ) : ()), qw( abs accept alarm atan2 bind binmode bless ), ($] >= 5.009003 && ($] < 5.027007 || $] >= 5.027008 || $CPERL) ? qw( break ) : ()), qw( caller chdir chmod chomp chop chown chr chroot close closedir connect cos crypt dbmclose dbmopen ), ($] >= 5.009003 && ($] < 5.027007 || $CPERL) ? qw( default ) : ()), qw( defined delete die dump each endgrent endhostent endnetent endprotoent endpwent endservent eof eval ), ($] >= 5.015005 ? qw( evalbytes ) : ()), qw( exec exists exit exp ), ($] >= 5.029 && $CPERL ? qw( extern ) : ()), ($] >= 5.015008 ? qw( fc ) : ()), qw( 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 ), ($] >= 5.009003 ? qw( given ) : ()), qw( glob gmtime goto grep hex index int ioctl ), ($] >= 5.031007 ? qw( isa ) : ()), qw( join keys kill last lc lcfirst length link listen local localtime ), ($] >= 5.004 ? qw( lock ) : ()), qw( log lstat map mkdir msgctl msgget msgrcv msgsnd my next not oct open opendir ord ), ($] >= 5.005061 ? qw( our ) : ()), qw( 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 ), ($] >= 5.009003 ? qw( say ) : ()), qw( 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 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 ), ($] >= 5.009003 && ($] < 5.027007 || $] >= 5.027008 || $CPERL) ? qw( when ) : ($] >= 5.009003 && !$CPERL) ? qw( whereis whereso ) : ()), qw( 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'; @Barewords = ( qw( __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ NULL and ), #removed with a96df643850d22bc4a94 ($] >= 5.000 && $] < 5.019010 ? qw( CORE ) : ()), ($CPERL && $] >= 5.027001 ? qw( class method role multi has ) : ()), qw( cmp continue do else elsif eq ), # added with dor (c963b151157d), removed with f23102e2d6356 # in fact this was never in keywords.h for some reason ($] >= 5.008001 && $] < 5.010 ? qw( err ) : ()), qw( for foreach ge gt if le lock lt m ne no or package q qq ), ($] >= 5.004072 ? qw( qr ) : ()), ($] == 5.007003 ? qw( qu ) : ()), qw( qw qx s sub tr unless until while x xor y ), # also with default, say ($] >= 5.009003 ? qw( break given when ) : () ), # removed as useless with 5.27.7, re-added with 7896dde7482a2851 ($] >= 5.009003 && ($] < 5.027007 || $] >= 5.027008) ? qw( default ) : () ), ($] >= 5.009004 ? qw( state ) : () ), ($] >= 5.033007 ? qw( try catch ) : () ), ($] >= 5.035004 ? qw( defer ) : () ), ($] >= 5.035008 ? qw( finally ) : () ), ($] >= 5.038000 ? qw( ADJUST class field method ) : () ), ($] >= 5.039002 ? qw{ __CLASS__ } : () ), ); # Extra barewords not in keywords.h (import was never in keywords) use vars '@BarewordsExtra'; @BarewordsExtra = qw( import unimport ); use vars '@TieIOMethods'; @TieIOMethods = qw( BINMODE CLEAR CLEARERR CLONE CLONE_SKIP CLOSE DELETE EOF ERROR EXISTS EXTEND FDOPEN FETCH FETCHSIZE FILENO FILL FIRSTKEY FLUSH GETC NEXTKEY OPEN POP POPPED PRINT PRINTF PUSH PUSHED READ READLINE SCALAR SEEK SETLINEBUF SHIFT SPLICE STORE STORESIZE SYSOPEN TELL TIEARRAY TIEHANDLE TIEHASH TIESCALAR UNREAD UNSHIFT UNTIE UTF8 WRITE ); use vars '@UNIVERSALMethods'; @UNIVERSALMethods = qw( can isa DOES VERSION ); use vars '@ExporterSymbols'; @ExporterSymbols = qw( @EXPORT @EXPORT_OK @EXPORT_FAIL @EXPORT_TAGS _push_tags _rebuild_cache as_heavy export export_fail export_fail_in export_ok_tags export_tags export_to_level heavy_export heavy_export_ok_tags heavy_export_tags heavy_export_to_level heavy_require_version require_version ); use vars '@Symbols'; @Symbols = ( @Scalars, @Arrays, @Hashes, @Filehandles, @Functions ); # This quote is blatantly copied from ErrantStory.com, Michael Poe's # comic. BEGIN { $^W = 0 } "You know, when you stop and think about it, Cthulhu is a bit a Mary Sue isn't he?" __END__ =encoding UTF-8 =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 supplies several arrays of exportable keywords: C<@Scalars>, C<@Arrays>, C<@Hashes>, C<@Filehandles>, C<@Symbols>, C<@Functions>, C<@Barewords>, C<@BarewordsExtra>, C<@TieIOMethods>, C<@UNIVERSALMethods> and C<@ExporterSymbols>. The C<@Symbols> array includes the contents of each 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. C<@BarewordsExtra> adds a few barewords which are not in keywords.h. All additions and modifications are welcome. The perl parser uses a static list of keywords from F which constitutes the strict list of keywords @Functions and @Barewords, though some @Functions are not functions in the strict sense. Several library functions use more special symbols, handles and methods. =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. =item C<@BarewordsExtra> This is a list of barewords which are missing from keywords.h, handled extra in the tokenizer. =item C<@TieIOMethods> Those are special tie or PerlIO methods called by the perl core, namely for tieing or PerlIO::via (or both of those) or threads. =item C<@UNIVERSALMethods> Methods defined by the core package UNIVERSAL. =item C<@ExporterSymbols> Variables or functions used by Exporter (some internal), which is almost as good as being keywords, for you mustn't use them for any other purpose in any package that isa Exporter, which is quite common. =back =head1 EXPORT Anything can be exported if you desire. Use the :all tag to get everything. =head1 SEE ALSO F from the perl source, L, L, L. =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. 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 =item * GIT repository L =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * Search CPAN L =back =head1 ACKNOWLEDGEMENTS Michael G Schwern, Reini Urban, Florian Ragwitz and Zsbán Ambrus for patches and releases. =head1 COPYRIGHT AND LICENSE Copyright 2009 Joshua ben Jore, All rights reserved. Copyright 2013, 2015, 2017-2021 Reini Urban, 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. =head1 SOURCE AVAILABILITY This source is in Github: L =head1 AUTHOR Joshua ben Jore =head1 MAINTAINER Reini Urban