Skip Menu |

This queue is for tickets about the B-Keywords CPAN distribution.

Report information
The Basics
Id: 62382
Status: resolved
Priority: 0/
Queue: B-Keywords

People
Owner: RURBAN [...] cpan.org
Requestors: ambrus [...] math.bme.hu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Add some more keywords
Date: Fri, 22 Oct 2010 22:36:55 +0200
To: bug-B-Keywords [...] rt.cpan.org
From: Zsbán Ambrus <ambrus [...] math.bme.hu>
Dear maintainer of the B::Keywords module, I collected perl keywords for a soon to be released module (Object::Import, snapshot at "http://www.math.bme.hu/~ambrus/pu/objexport.tgz"), and B::Keywords was great help in this. I'd like to thank you for the module. However, there are some more keywords you might want to add to the module. I'm not quite sure what your definition of keyword is (there's probably no good single definition), so I don't send a patch, instead you'll have to decide what to add where. (You could also read the source of my module directly in case I miss something here.) Firstly, *_ is a special filehandle (documented in perlfunc under stat). DATA is also a special filehandle in any package. Also, the following three are special filehandles aliased to their uppercase variants (deprecated): stdin stdout stderr Secondly, all of the following are special functions sometimes called by the perl core, namely for tieing or PerlIO::via (or both of those) or threads. 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 Thirdly, many functions whose name starts with a left parenthesis are used by operator overloading, and so is the package scalar ${$pkg"::()"}. You can find out about these from the source of the overload pragma. Fourth, the functions &import and &unimport are called by builtins (which is especially ironic since import is already mentioned at one point in the source code of B::Keywords, but not as a keyword). Fifth, you might now want to count "continue" as a function instead of a bareword because it now has a second meaning, but with qw"lock exp no" in the list of barewords and "format" in the list of functions I'm not quite sure about the distinction you use. Incidentally, it would be useful to have a list of builtin functions that are overridable by importing a sub or by "use subs" available separately, but I don't know a quick way to compile that list so I can't help you there. Sixth, the following four are methods in UNIVERSAL: can isa DOES VERSION. Also, the following are 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 @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 Ambrus
Please see https://github.com/rurban/b-keywords/commits/master for the proposed changes for 1.13. On Fri Oct 22 16:37:25 2010, ambrus@math.bme.hu wrote: Show quoted text
> Dear maintainer of the B::Keywords module, > > I collected perl keywords for a soon to be released module > (Object::Import, snapshot at > "http://www.math.bme.hu/~ambrus/pu/objexport.tgz"), and B::Keywords > was great help in this. I'd like to thank you for the module. > > However, there are some more keywords you might want to add to the > module. I'm not quite sure what your definition of keyword is > (there's probably no good single definition), so I don't send a patch, > instead you'll have to decide what to add where. (You could also read > the source of my module directly in case I miss something here.) > > Firstly, *_ is a special filehandle (documented in perlfunc under > stat). DATA is also a special filehandle in any package. Also, the > following three are special filehandles aliased to their uppercase > variants (deprecated): stdin stdout stderr > > Secondly, all of the following are special functions sometimes called > by the perl core, namely for tieing or PerlIO::via (or both of those) > or threads. 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 > > Thirdly, many functions whose name starts with a left parenthesis are > used by operator overloading, and so is the package scalar > ${$pkg"::()"}. You can find out about these from the source of the > overload pragma. > > Fourth, the functions &import and &unimport are called by builtins > (which is especially ironic since import is already mentioned at one > point in the source code of B::Keywords, but not as a keyword). > > Fifth, you might now want to count "continue" as a function instead of > a bareword because it now has a second meaning, but with qw"lock exp > no" in the list of barewords and "format" in the list of functions I'm > not quite sure about the distinction you use. Incidentally, it would > be useful to have a list of builtin functions that are overridable by > importing a sub or by "use subs" available separately, but I don't > know a quick way to compile that list so I can't help you there. > > Sixth, the following four are methods in UNIVERSAL: can isa DOES > VERSION. Also, the following are 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 @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 > > Ambrus
-- Reini Urban
On Fri Apr 05 15:17:18 2013, RURBAN wrote: Show quoted text
> Please see https://github.com/rurban/b-keywords/commits/master > for the proposed changes for 1.13.
We've changed now: - 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 Show quoted text
> On Fri Oct 22 16:37:25 2010, ambrus@math.bme.hu wrote:
> > Dear maintainer of the B::Keywords module, > > > > I collected perl keywords for a soon to be released module > > (Object::Import, snapshot at > > "http://www.math.bme.hu/~ambrus/pu/objexport.tgz"), and B::Keywords > > was great help in this. I'd like to thank you for the module. > > > > However, there are some more keywords you might want to add to the > > module. I'm not quite sure what your definition of keyword is > > (there's probably no good single definition), so I don't send a patch, > > instead you'll have to decide what to add where. (You could also read > > the source of my module directly in case I miss something here.) > > > > Firstly, *_ is a special filehandle (documented in perlfunc under > > stat). DATA is also a special filehandle in any package. Also, the > > following three are special filehandles aliased to their uppercase > > variants (deprecated): stdin stdout stderr > > > > Secondly, all of the following are special functions sometimes called > > by the perl core, namely for tieing or PerlIO::via (or both of those) > > or threads. 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 > > > > Thirdly, many functions whose name starts with a left parenthesis are > > used by operator overloading, and so is the package scalar > > ${$pkg"::()"}. You can find out about these from the source of the > > overload pragma. > > > > Fourth, the functions &import and &unimport are called by builtins > > (which is especially ironic since import is already mentioned at one > > point in the source code of B::Keywords, but not as a keyword). > > > > Fifth, you might now want to count "continue" as a function instead of > > a bareword because it now has a second meaning, but with qw"lock exp > > no" in the list of barewords and "format" in the list of functions I'm > > not quite sure about the distinction you use. Incidentally, it would > > be useful to have a list of builtin functions that are overridable by > > importing a sub or by "use subs" available separately, but I don't > > know a quick way to compile that list so I can't help you there. > > > > Sixth, the following four are methods in UNIVERSAL: can isa DOES > > VERSION. Also, the following are 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 @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 > > > > Ambrus
-- Reini Urban
Uploaded 1.13 -- Reini Urban