perl-Require-HookChain-0.001-alt1.noarch.rpm


Advertisement

Description

perl-Require-HookChain - Chainable require hook

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package name perl-Require-HookChain
Package version 0.001
Package release alt1
Package architecture noarch
Package type rpm
Installed size 28.57 KB
Download size 28.57 KB
Official Mirror ftp.altlinux.org
This module lets you create chainable require hooks. As one already understands,
Perl lets you put a coderef or object in `@INC'. In the case of object, its
`INC' method will be called by Perl:
package My::INCHandler;
sub new { ... }
sub My::INCHandler::INC {
my ($self, $filename) = @_;
...
}
The method is passed itself then filename (which is what is passed to
`require()') and is expected to return nothing or a list of up to four values:
a scalar reference containing source code, filehandle, reference to subroutine,
optional state for subroutine (more information can be read from the the perlfunc manpage
manpage). As soon as the first hook in `@INC' returns non-empty value then the
search for source code is stopped.
With `Require::HookChain', you can put multiple hooks in `@INC' that all get
executed. When `use''d, `Require::HookChain' will install its own hook at the
beginning of `@INC' which will search for source code in `@INC' as well as
execute `INC' method of all the other hooks which are instances of
`Require::HookChain::*' class. Instead of filename, the method is passed a
`Require::HookChain::r' object (`$r'). The method can do things on `$r', for
example retrieve source code via `$r->src' or modify source code via `$r->src($new_content)'. After the method returns, the next
`Require::HookChain::*' hook is executed, and so on. The final source code will
be retrieved from `$r->src' and returned for Perl.
This lets one chainable hook munge the result of the previous chainable hook.
To create your own chainable require hook, see example in the section on "SYNOPSIS". First
you create a module under the `Require::HookChain::*' namespace, then create a
constructor as well as `INC' handler.

Alternatives

Package Version Architecture Repository
perl-Require-HookChain - - -

Requires

Name Value
/usr/share/perl5 -
perl(Scalar/Util.pm) -
rpmlib(PayloadIsLzma) -

Provides

Name Value
perl(Require/HookChain.pm) = 0.001
perl(Require/HookChain/prepend.pm) = 0.001
perl-Require-HookChain = 0.001-alt1

Download

Type URL
Binary Package perl-Require-HookChain-0.001-alt1.noarch.rpm
Source Package perl-Require-HookChain-0.001-alt1.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    
    rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
    rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
    
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-Require-HookChain rpm package:
    # sudo apt-get install perl-Require-HookChain

Files

Path
/usr/share/doc/perl-Require-HookChain-0.001/Changes
/usr/share/doc/perl-Require-HookChain-0.001/LICENSE
/usr/share/doc/perl-Require-HookChain-0.001/README
/usr/share/perl5/Require/HookChain.pm
/usr/share/perl5/Require/HookChain/prepend.pm

See Also

Package Description
perl-Resource-Dispose-0.01-alt1.noarch.rpm Syntax sugar for dispose pattern
perl-Resource-Loader-0.03-alt1.noarch.rpm perl module Resource-Loader
perl-Resource-Pack-0.03-alt1.noarch.rpm tools for managing application resources
perl-Resource-Pack-JSON-0.01-alt1.noarch.rpm Resource::Pack resource for the JSON Javascript library
perl-Resource-Pack-jQuery-0.01-alt1.noarch.rpm Resource::Pack resource for the jQuery Javascript library
perl-ResourcePool-1.0107-alt1.noarch.rpm A connection caching and pooling class
perl-ResourcePool-Resource-DBI-1.0101-alt1.noarch.rpm perl module ResourcePool-Resource-DBI
perl-ResourcePool-Resource-Net-LDAP-1.0002-alt1.noarch.rpm perl module ResourcePool-Resource-Net-LDAP
perl-ResourcePool-Resource-Redis-1-alt1.noarch.rpm Provides a ResourcePool wrapper for Redis
perl-ResourcePool-Resource-SOAP-Lite-1.0103-alt1.noarch.rpm SOAP::Lite bindings for ResourcePool
perl-Resources-1.04-alt1.noarch.rpm handling application defaults in Perl
perl-Resque-0.36-alt1.noarch.rpm Redis-backed library for creating background jobs, placing them on multiple queues, and processing
perl-Resque-Plugin-Delay-0.03-alt1.noarch.rpm Delay the execution of job
perl-Resque-Plugin-Retry-0.01-alt1.noarch.rpm Retry the fail job
perl-Resque-scripts-0.36-alt1.noarch.rpm Resque scripts
Advertisement
Advertisement