perl-Acme-Devel-Hide-Tiny-0.002-alt1.noarch.rpm


Advertisement

Description

perl-Acme-Devel-Hide-Tiny - Hide a perl module for testing, in one statement

Distribution: ALT Linux Sisyphus
Repository: Autoimports noarch
Package name: perl-Acme-Devel-Hide-Tiny
Package version: 0.002
Package release: alt1
Package architecture: noarch
Package type: rpm
Installed size: 17.17 KB
Download size: 17.17 KB
Official Mirror: ftp.altlinux.org
The the Devel::Hide manpage and the Test::Without::Module manpage modules are very helpful development tools. Unfortunately, using them in your .t files adds a test dependency. Maybe you don't want to do that. Instead, you can use the one-liner from the SYNOPSIS above, which is an extremely stripped down version of the Devel::Hide manpage. NOTE: this method only works on Perl v5.8.1 and later. Here is a more verbose, commented version of it: use lib map { my ( $m, $c ) = ( $_, qq{die "Can't locate $_ (hidden)\n"} ); sub { return unless $_[1] eq $m; open my $fh, "<", \$c; return $fh } } qw{Cpanel/JSON/XS.pm JSON/XS.pm} ; # end of 'use lib' statement When perl sees a coderef in `@INC', it gives the coderef a chance to provide the source code of that module. In this case, if the path is the one we want to hide, it returns a handle to source code that dies with the message we want and perl won't continue looking at @<INC> to find the real module source. The module is hidden and dies with a message similar to the one that would happen if it weren't installed. =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan

Alternatives

Requires

  • /usr/share/perl5
  • rpmlib(PayloadIsLzma)

Provides

  • perl(Acme/Devel/Hide/Tiny.pm) = 0.002
  • perl-Acme-Devel-Hide-Tiny = 0.002-alt1

    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-Acme-Devel-Hide-Tiny rpm package:
      # sudo apt-get install perl-Acme-Devel-Hide-Tiny

    Files

    • /usr/share/doc/perl-Acme-Devel-Hide-Tiny-0.002/Changes
    • /usr/share/doc/perl-Acme-Devel-Hide-Tiny-0.002/LICENSE
    • /usr/share/doc/perl-Acme-Devel-Hide-Tiny-0.002/README
    • /usr/share/perl5/Acme/
    • /usr/share/perl5/Acme/Devel/
    • /usr/share/perl5/Acme/Devel/Hide/Tiny.pm
    Advertisement
    Advertisement