Result:
found 152 distributions and 282 files matching your query ! ( run in 1.583 )


Test-MockCommand

 view release on metacpan or  search on metacpan

lib/Test/MockCommand/ScalarReadline.pm  view on Meta::CPAN

	    $offset += ${$/};
	}
	return @out;
    }

    # paragraph mode: $/ = ''
    my $rs = $/;
    my $paras = 0;
    if ($rs eq '') {
	$rs = "\n\n";
	$paras = 1;

 view all matches for this distribution


Text-Bidi

 view release on metacpan or  search on metacpan

bin/fribidi.pl  view on Meta::CPAN

    $Opts{$_} = 1 foreach (qw(levels dir ltov types hex));
}


# read paragraphs (and make perlcritic happy with 'local')
local $/ = '';
my $flags;
$flags = { break => $Opts{'break'} } if defined $Opts{'break'};
my $dir = $Opts{'rtl'} ? $Text::Bidi::Par::RTL 
                       : $Opts{'ltr'} ? $Text::Bidi::Par::LTR : undef;
while (<>) {

 view all matches for this distribution


Text-Lossy

 view release on metacpan or  search on metacpan

lib/Text/Lossy.pm  view on Meta::CPAN

want to buffer the entire input before writing the (only) line to C<stdout>. The
newline at the end will allow downstream processes to work on new lines, too.
Otherwise, this filter is not quite as efficient as the L<whitespace> filter.

Any newlines in the middle of text are collapsed to a space, too. This is especially
useful if you are reading in "paragraph mode", e.g. C<$/ = ''>, as you will get
one long line per former paragraph.

=cut

sub whitespace_nl {

 view all matches for this distribution


Text-MessageFormat

 view release on metacpan or  search on metacpan

t/01_mf.t  view on Meta::CPAN

use strict;
use Test::More tests => 25;
use Text::MessageFormat;

my @Tests = do {
    local $/ = '';
    map {
	my($name, $format, $args, $output) = split /\n/;
	$args = [ grep length, split /\|/, $args ];
	[ $name, $format, $args, $output ];
    } <DATA>;

 view all matches for this distribution


Text-Tabulate

 view release on metacpan or  search on metacpan

t/class.t  view on Meta::CPAN


# Tests
BEGIN { use_ok('Text::Tabulate'); }

# Load the data.
#$/ = '';	# paragraph mode.
#my @data = split(/\n/, <DATA>);
##ok($#data, 'data loaded');

# Test the routine.

 view all matches for this distribution


Text-Xslate

 view release on metacpan or  search on metacpan

t/010_internals/017_render.t  view on Meta::CPAN

}

rmtree(cache_dir);
for(1 .. 2) {
    # must not depend on global variables
    local $/ = '';
    local $\ = "\n";

    my $tx = Text::Xslate->new(
        cache     => 1,
        path      => [path],

 view all matches for this distribution


Tie-File

 view release on metacpan or  search on metacpan

lib/Tie/File.pm  view on Meta::CPAN

	"e p"
	"ky fli"
	"!\n"

An undefined value is not permitted as a record separator.  Perl's
special "paragraph mode" semantics (E<agrave> la C<$/ = "">) are not
emulated.

Records read from the tied array do not have the record separator
string on the end; this is to allow

 view all matches for this distribution


Tie-TwoLevelHash

 view release on metacpan or  search on metacpan

TwoLevelHash.pm  view on Meta::CPAN


	if (!open($FH,"$slh")) {
		croak "Cannot open $FH $slh: $!";
	}

local $/ = "";

my @records = <$FH>;

# Make sure comments at top of TLH file stay
my $comment;

 view all matches for this distribution


Tk

 view release on metacpan or  search on metacpan

pod/mvfor  view on Meta::CPAN

#!/usr/local/bin/new/perl -w
use strict;

$/ = '';
$^I = '.bak';

my @undo;
my $edits = 0;
my $seen_NAME = 0;

 view all matches for this distribution


UML-State

 view release on metacpan or  search on metacpan

drawstate.source  view on Meta::CPAN


=cut

use UML::State;

$/                   = "";   # paragraph mode

my $node_data        = <>;
my $start_states     = <>;
my $accepting_states = <>;

 view all matches for this distribution


Unicode-Precis

 view release on metacpan or  search on metacpan

t/01decomposeWidth.t  view on Meta::CPAN

no utf8;

use Test::More tests => 1;
use Unicode::Precis::Utils qw(decomposeWidth);

my ($comp, $decomp) = do { local $/ = ''; <DATA> };
1 while chomp ($comp, $decomp);
is(decomposeWidth($comp), $decomp, $decomp);

__END__
 !"#$%&'()*+,-./

 view all matches for this distribution


Unicode-Tussle

 view release on metacpan or  search on metacpan

script/tcgrep  view on Meta::CPAN


    if ($opt{p} || $opt{P}) {
	@patterns = map {"(?m)$_"} @patterns;
    }

    $opt{p}   && ($/ = '');
    $opt{P}   && ($/ = eval(qq("$opt{P}")));     # for -P '%%\n'
    $opt{w}   && (@patterns = map {'\b' . $_ . '\b'} @patterns);
    $opt{'x'} && (@patterns = map {"^$_\$"} @patterns);
    if (@ARGV) {
	$Mult = 1 if ($opt{r} || (@ARGV > 1) || -d $ARGV[0]) && !$opt{h};

 view all matches for this distribution


WARC

 view release on metacpan or  search on metacpan

t/WARC-Record-Logical-Block.t  view on Meta::CPAN


note('*' x 60);

# Verify READLINE (paragraph)
{
  local $/ = '';	# select paragraph mode

  my $xh = make_test_handle
    "abc\ndef\n\n\n\nghi\njkl\n\n", "mno\npqr\nstu\n\nvwx\nyz", "0\n\n123\n456";
  note_handle_state $xh;
  ## paragraph:  within segment

t/WARC-Record-Logical-Block.t  view on Meta::CPAN


# Verify READLINE (mixed modes)
{
  my $xh;
  {
    local $/ = '';	# ensure that handle is usable in paragraph mode
    $xh = make_test_handle "abc\n";
  }
  is(scalar <$xh>, "abc\n",	'read line to eof');
  local $/ = '';	# select paragraph mode
  ok((not defined scalar <$xh>),'read paragraph at eof');

  $/ = \4;		# select record mode
  $xh = make_test_handle '1234';
  is(scalar <$xh>, '1234',	'read record to eof');

 view all matches for this distribution


WWW-SVT-Play

 view release on metacpan or  search on metacpan

t/lib/LWP/UserAgent.pm  view on Meta::CPAN

# Mock helpers

sub _load_aliases {
	open my $fh, '<', 't/data/aliases.json' or
		die("Could not open alias file: $!");
	my $blob = do { local $/=''; <$fh> };
	close $fh;
	return decode_json($blob);
}

sub _gen_resp {

 view all matches for this distribution


Win32-Backup-Robocopy

 view release on metacpan or  search on metacpan

lib/Win32/Backup/Robocopy.pm  view on Meta::CPAN

	# READ the configuration 
	my $json = JSON::PP->new->utf8->pretty->canonical;
	open my $fh, '<', $file or croak "unable to read $file";
	my $lines;
	{
		local $/ = '';
		$lines = <$fh>;
	}
	close $fh or croak "impossible to close $file";
	my $data;
	{ 

 view all matches for this distribution


Workflow

 view release on metacpan or  search on metacpan

t/context-persists.t  view on Meta::CPAN

is($wf0->context->param("name"), "hans", "wf0 context found");

{    # check for hans in persister file
    open(my $x, $file);
    ok($x, "persister file opened");
    local $/ = "";
    like(<$x>, qr/hans/, "found context in persister file");
}

### FETCH $id
my $wf1 = FACTORY->fetch_workflow("FOO", $wf0->id);

 view all matches for this distribution


XML-ASCX12

 view release on metacpan or  search on metacpan

examples/test1.pl  view on Meta::CPAN

open (TFH, '< ./INV.110.SAMPLE');
binmode(TFH);
my $edi;
while(<TFH>)
{
    $/ = '';
    chomp;
    $edi .= $_;
}
close(TFH);

 view all matches for this distribution


XML-Checker

 view release on metacpan or  search on metacpan

t/element_text.t  view on Meta::CPAN


print "1..2\n";

use XML::Checker::Parser;

$/=''; # records are now separated by an empty line

# first parse, a valid document
my $doc1=<DATA>;
my $p= new XML::Checker::Parser;
eval

 view all matches for this distribution


YATT-Lite

 view release on metacpan or  search on metacpan

Lite/XHF.pm  view on Meta::CPAN

		});
}

sub tokenize {
  (my MY $self) = @_;
  local $/ = "";
  my $fh = $$self{cf_FH};
  unless ($self->{fh_configured}++) {
    if (not $self->{cf_bytes} and not $self->{cf_string}
	and $self->{cf_encoding}) {
      binmode $fh, ":encoding($self->{cf_encoding})";

 view all matches for this distribution


YATT

 view release on metacpan or  search on metacpan

scripts/yatt.lib/YATT/XHF.pm  view on Meta::CPAN

  $self;
}

sub read_as_hashlist {
  my MY $reader = shift;
  local $/ = "";
  my $fh = $$reader{cf_FH};
  my @result;
  while (defined (my $paragraph = <$fh>)) {
    @{$$reader{cf_tokens}} = $reader->tokenize($paragraph)
      or next;

scripts/yatt.lib/YATT/XHF.pm  view on Meta::CPAN

sub read_as {
  (my MY $reader, my ($type)) = @_;
  my $sub = $reader->can("organize_as_$type")
    or croak "Unknown read_as type: $type";

  local $/ = "";
  my $fh = $$reader{cf_FH};
  until ($$reader{cf_tokens} && @{$$reader{cf_tokens}}) {
    defined (my $paragraph = <$fh>) or last;
    @{$$reader{cf_tokens}} = $reader->tokenize($paragraph)
  }

 view all matches for this distribution


iCal-Parser

 view release on metacpan or  search on metacpan

t/02parse.t  view on Meta::CPAN

$h=iCal::Parser->new(start=>'20040101',tz=>$tz)->parse_files(@cals);
is_deeply($h,$VAR1,"multiple calendars (parse_files)");

my @s=();
{
    local $/='';
    my $i=0;
    foreach my $c (@cals) {
	$VAR1->{cals}[$i]{'X-WR-CALNAME'}='Calendar ' . ($i+1);
	++$i;
	open IN, "<$c" or die "Can't open $c, $!";

 view all matches for this distribution


makepp

 view release on metacpan or  search on metacpan

Mpp/Text.pm  view on Meta::CPAN

  }
  $helpend =~ s/\@BASEVERSION\@/$BASEVERSION/;
  our $opts ||= $pod;
  print "\n";
  open my $fh, '<', "$Mpp::datadir/pod/$opts.pod" or die $!;
  my $opt = $/ = '';
  my $found;
  while( <$fh> ) {		# skip to before 1st opt
    $found = 1 if /Valid options are|^=head1 OPTIONS/;
    last if $found && /^=over/;
  }

 view all matches for this distribution


perl-ldap

 view release on metacpan or  search on metacpan

contrib/ldifsort.pl  view on Meta::CPAN

my $sorthier = $args{h};

die "usage: $0 -k keyattr [-acdhn] ldiffile\n"
	unless $keyattr && $ldiffile;

$/ = "";

open(LDIFH, $ldiffile) || die "$ldiffile: $!\n";

my $pos = 0;
my @valuepos;

 view all matches for this distribution


perl

 view release on metacpan or  search on metacpan

Porting/sort_perldiag.pl  view on Meta::CPAN

no locale;

my %items;
my $item_key;

$/ = '';

while (<>) {
  if (/^=item\s+(.+)/) {
    # new item

 view all matches for this distribution


perl_mlb

 view release on metacpan or  search on metacpan

Pod/Html.pm  view on Meta::CPAN

        $Htmlfileurl= "$Htmldir/" . substr( $Htmlfile, length( $Htmldir ) + 1);
    }

    # read the pod a paragraph at a time
    warn "Scanning for sections in input file(s)\n" if $Verbose;
    $/ = "";
    my @poddata  = <POD>;
    close(POD);

    # be eol agnostic
    for (@poddata) {

 view all matches for this distribution


perlbench

 view release on metacpan or  search on metacpan

benchmarks/app/MyPodHtml.pm  view on Meta::CPAN

        $Htmlfileurl= "$Htmldir/" . substr( $Htmlfile, length( $Htmldir ) + 1);
    }

    # read the pod a paragraph at a time
    warn "Scanning for sections in input file(s)\n" if $Verbose;
    $/ = "";
    my @poddata  = <POD>;
    close(POD);

    # be eol agnostic
    for (@poddata) {

 view all matches for this distribution


perlfaq

 view release on metacpan or  search on metacpan

lib/perlfaq6.pod  view on Meta::CPAN

want caret or dollar to match at any point inside the record next
to newlines. But it's imperative that $/ be set to something other
than the default, or else we won't actually ever have a multiline
record read in.

    $/ = '';          # read in whole paragraph, not just one line
    while ( <> ) {
        while ( /\b([\w'-]+)(\s+\g1)+\b/gi ) {     # word starts alpha
            print "Duplicate $1 at paragraph $.\n";
        }
    }

Here's some code that finds sentences that begin with "From " (which would
be mangled by many mailers):

    $/ = '';          # read in whole paragraph, not just one line
    while ( <> ) {
        while ( /^From /gm ) { # /m makes ^ match next to \n
        print "leading From in paragraph $.\n";
        }
    }

 view all matches for this distribution


pmtools

 view release on metacpan or  search on metacpan

bin/pmall  view on Meta::CPAN


my $Module;

if ($opt_s) {
    if (open(ME, "-|")) {
	$/ = '';
	while (<ME>) {
	    chomp;
	    print join("\n", sort split /\n/), "\n";
	} 
	exit;

bin/pmall  view on Meta::CPAN

	return 0;
    } 

    $: = " -:";

    local $/ = '';
    local $_;
    while (<POD>) {
	if (/=head\d\s+NAME/) {
	    chomp($_ = <POD>);
	    s/^.*?-\s+//s; 

 view all matches for this distribution


pop

 view release on metacpan or  search on metacpan

lib/POP/Schema_parser.pm  view on Meta::CPAN

  return bless {}, $type;
}

sub parse {
  my($this, $fh) = @_;
  local $/ = ""; # Paragraph mode
  while (<$fh>) {
    s/^--([A-Z]+)(?:\s+CLASS=\[([^\]]+)\])?\n// or croak "Syntax error [$_]";
    my($type, $class) = ($1, $2);
    $class ||= 'GLOBAL';
    push(@{$this->{$class}}, {'type' => $type, 'sql' => $_});

 view all matches for this distribution


ppt

 view release on metacpan or  search on metacpan

bin/grep  view on Meta::CPAN


    if ($opt{p} || $opt{P}) {
	@patterns = map {"(?m)$_"} @patterns;
    }

    $opt{p}   && ($/ = '');
    $opt{P}   && ($/ = eval(qq("$opt{P}")));     # for -P '%%\n'
    $opt{w}   && (@patterns = map {'\b' . $_ . '\b'} @patterns);
    $opt{'x'} && (@patterns = map {"^$_\$"} @patterns);
    $Mult = 1 if ($opt{r} || @ARGV > 1 || @ARGV > 0 && -d $ARGV[0]) && !$opt{h};
    $opt{1}   += $opt{l};                   # that's a one and an ell

 view all matches for this distribution


( run in 1.583 second using v1.01-cache-2.11-cpan-49f99fa48dc )