Paranoid

 view release on metacpan or  search on metacpan

lib/Paranoid/IO/FileMultiplexer/Block.pm  view on Meta::CPAN

    my $self    = shift;
    my $content = shift;
    my $start   = shift;
    my $length  = shift;
    my $offset  = shift;
    my $file    = $$self{file};
    my $bsize   = $$self{blockSize};
    my $minp    = $$self{minPos};
    my $maxp    = $$self{maxPos};
    my $rv      = PTRUE_ZERO;
    my $cdata   = defined $content ? ( length $content ) . ' bytes' : undef;
    my $blkLeft;

    subPreamble( PDLEVEL3, '$;$$$', $cdata, $start, $length, $offset );

    # NOTE:  This method intentionally allows writes of a length greater than
    # the block size, but it will only write content from within the block
    # boundaries.

    # Error out if we were not given a valid scalar ref
    unless ( defined $content and length $content ) {
        $rv = undef;
        pdebug( 'invalid argument for content', PDLEVEL1 );
    }



( run in 0.220 second using v1.01-cache-2.11-cpan-454fe037f31 )