Archive-Zip

 view release on metacpan or  search on metacpan

lib/Archive/Zip/MemberRead.pm  view on Meta::CPAN

sub input_record_separator {
    my $self = shift;
    if (@_) {
        $self->{sep} = shift;
        $self->{sep_re} =
          _sep_as_re($self->{sep});    # Cache the RE as an optimization
    }
    return exists $self->{sep} ? $self->{sep} : $/;
}

# Return the input_record_separator in use as an RE fragment
# Note that if we have a per-instance input_record_separator
# we can just return the already converted value. Otherwise,
# the conversion must be done on $/ every time since we cannot
# know whether it has changed or not.
sub _sep_re {
    my $self = shift;

    # Important to phrase this way: sep's value may be undef.
    return exists $self->{sep} ? $self->{sep_re} : _sep_as_re($/);
}



( run in 1.095 second using v1.01-cache-2.11-cpan-364913b4093 )