perl-PerlIO-via-Limit - PerlIO layer for length restrictions

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package name perl-PerlIO-via-Limit
Package version 0.04
Package release alt2
Package architecture noarch
Package type rpm
Installed size 27.32 KB
Download size 27.32 KB
Official Mirror
PerlIO::via::Limit implements a PerlIO layer that restricts length of stream.
There is an important constraint,
it is able to specify only one limit value within application
because the 'length' is a class data.
The following example does not work as expected:
open( my $fh1, "<:via(Limit)", $file1 );
open( my $fh2, "<:via(Limit)", $file2 );
local $/ = undef;
my $data1 = <$fh1>;
my $data2 = <$fh2>;
CORE::length($data1); # is not 256 but 512
CORE::length($data2); # is also 512
Therefore, it is necessary to divide namespace,
in order to use two or more limit values simultaneously.
package Foo;
use base PerlIO::via::Limit;
package main;
open( my $fh1, "<:via(Limit)", $file1 );
open( my $fh2, "<:via(Foo)", $file2 );
local $/ = undef;
my $data1 = <$fh1>;
my $data2 = <$fh2>;
CORE::length($data1); # is 256
CORE::length($data2); # is 512
Actually you do not have to code like the above,
instead, the create() method supports it by simple interface.
my $limit256 = PerlIO::via::Limit->create(256);
my $limit512 = PerlIO::via::Limit->create(512);
open( my $fh1, "<:via($limit256)", $file1 );
open( my $fh2, "<:via($limit100)", $file2 );


Package Version Architecture Repository
perl-PerlIO-via-Limit - - -


Name Value
/usr/share/perl5 -
perl(Exception/ -
rpmlib(PayloadIsLzma) -


Name Value
perl(PerlIO/via/ = 0.040
perl-PerlIO-via-Limit = 0.04-alt2


Type URL
Binary Package perl-PerlIO-via-Limit-0.04-alt2.noarch.rpm
Source Package perl-PerlIO-via-Limit-0.04-alt2.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-PerlIO-via-Limit rpm package:
    # sudo apt-get install perl-PerlIO-via-Limit



See Also

Package Description
perl-PerlIO-via-LineNumber-0.04-alt1.noarch.rpm PerlIO Layer for prefixing line numbers
perl-PerlIO-via-Logger-1.01-alt1.noarch.rpm perl module PerlIO-via-Logger
perl-PerlIO-via-MD5-0.07-alt1.noarch.rpm PerlIO Layer for MD5 Digests
perl-PerlIO-via-Pipe-1.100860-alt1.noarch.rpm PerlIO layer to filter input through a Text::Pipe
perl-PerlIO-via-Pod-0.05-alt1.noarch.rpm PerlIO Layer for extracting plain old documentation
perl-PerlIO-via-PrepareCP1251-0.02-alt1.noarch.rpm prepare unicode stream to be encoded as cp1251
perl-PerlIO-via-Rotate-0.08-alt1.noarch.rpm PerlIO Layer for rotational deviation
perl-PerlIO-via-SeqIO-0.0322-alt1.noarch.rpm PerlIO layer for biological sequence formats
perl-PerlIO-via-Skip-0.06-alt1.noarch.rpm PerlIO layer for skipping lines
perl-PerlIO-via-StripHTML-0.04-alt1.noarch.rpm perl module PerlIO-via-StripHTML
perl-PerlIO-via-ToFirePHP-1.100860-alt1.noarch.rpm log to FirePHP via an PerlIO layer
perl-PerlIO-via-UnComment-0.04-alt1.noarch.rpm PerlIO Layer for removing comments
perl-PerlIO-via-UnPod-0.05-alt1.noarch.rpm PerlIO Layer for removing plain old documentation
perl-PerlIO-via-Unidecode-1.02-alt1.noarch.rpm perl module PerlIO-via-Unidecode
perl-PerlIO-via-as_is-0.001-alt1.noarch.rpm PerlIO layer that passes everything as-is