perl-Keyword-Declare - Declare new Perl keywords...via a keyword...named C<keyword>

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package filename perl-Keyword-Declare-0.001014-alt1.noarch.rpm
Package name perl-Keyword-Declare
Package version 0.001014
Package release alt1
Package architecture noarch
Package type rpm
Category Development/Perl
Homepage -
License -
Maintainer -
Download size 129.19 KB
Installed size 129.19 KB
This module implements a new Perl keyword: `keyword', which you can
use to specify other new keywords.
Normally, to define new keywords in Perl, you either have to write them
in XS (shiver!) or use a module like the Keyword::Simple manpage or
the Keyword::API manpage. Using any of these approaches requires you to grab all
the source code after the keyword, manually parse out the components of
the keyword's syntax, construct the replacement source code, and then
substitute it for the original source code you just parsed.
Using Keyword::Declare, you define a new keyword by specifying its name
and a parameter list corresponding to the syntactic components that must
follow the keyword. You then use those parameters to construct and
return the replacement source code. The module takes care of setting up
the keyword, and of the associated syntax parsing, and of inserting the
replacement source code in the correct place.
For example, to create a new keyword (say: `loop') that takes an optional
count and a block, you could write:
use Keyword::Declare;
keyword loop (Int $count?, Block $block) {
if (defined $count) {
return "for (1..$count) $block";
else {
return "while (1) $block";
At compile time, when the parser subsequently encounters source
code such as:
loop 10 {
$cmd = readline;
last if valid_cmd($cmd);
then the keyword's $count parameter would be assigned the value `"10"'
and its $code parameter would be assigned the value
`"{\n$cmd_=_readline;\nlast_if_valid_cmd($cmd);\n}"'. Then the "body" of
the keyword definition would be executed and its return value would be used as the
replacement source code:
for (1..10) {
$cmd = readline;
last if valid_cmd($cmd);


Package Version Architecture Repository
perl-Keyword-Declare - - -


Name Value
/usr/share/perl5 -
perl(B/Hooks/ -
perl(Keyword/ -
perl(List/ >= 1.450
perl( >= 0.0.015
perl( -
perl-base >= 1:5.12.0
rpmlib(PayloadIsLzma) -


Name Value
perl(Keyword/ = 0.001.014
perl-Keyword-Declare = 0.001014-alt1


Type URL
Binary Package perl-Keyword-Declare-0.001014-alt1.noarch.rpm
Source Package perl-Keyword-Declare-0.001014-alt1.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    rpm [Sisyphus] noarch autoimports
    rpm [Sisyphus] noarch autoimports
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-Keyword-Declare rpm package:
    # sudo apt-get install perl-Keyword-Declare



See Also

Package Description
perl-Keyword-TailRecurse-0.01-alt1.noarch.rpm Enables true tail recursion
perl-Keyword-Value-0.1.2-alt1.noarch.rpm assign a constant to a variable or symbol
perl-Keyword-With-0.003-alt1.noarch.rpm provide new syntax to use a 'given' statement without an experimental warning
perl-KeywordsSpider-0.02-alt1.noarch.rpm web spider searching for keywords
perl-KiokuDB-0.57-alt1.noarch.rpm Object Graph storage engine
perl-KiokuDB-Backend-BDB-0.15-alt1.noarch.rpm the BerkeleyDB manpage backend for the KiokuDB manpage
perl-KiokuDB-Backend-DBI-1.23-alt1.noarch.rpm DBI backend for KiokuDB
perl-KiokuDB-Backend-Files-0.06-alt1.noarch.rpm One file per object backend
perl-KiokuDB-Backend-Redis-0.02-alt1.noarch.rpm Redis backend for KiokuDB
perl-KiokuDB-Cmd-0.03-alt1.noarch.rpm the KiokuDB manpage command line tools
perl-KiokuDB-Navigator-0.04-alt1.noarch.rpm KiokuDB Database Navigator
perl-KiokuDB-scripts-0.57-alt1.noarch.rpm KiokuDB scripts
perl-KiokuX-Model-0.02-alt1.noarch.rpm A simple application specific wrapper for the KiokuDB manpage
perl-KiokuX-Model-Role-Annotations-0.01-alt1.noarch.rpm A role for adding annotations to objects in a KiokuDB database
perl-KiokuX-User-0.02-alt1.noarch.rpm A generic role for user objects stored in the KiokuDB manpage