Result:
found 1203 distributions and 1934 files matching your query ! ( run in 1.830 )


MogileFS-REST

 view release on metacpan or  search on metacpan

lib/MogileFS/REST.pm  view on Meta::CPAN

}

sub split_path {
    my $path = shift;
    $path =~ s{^/+}{};
    my ($domain, $key) = split m{/}, $path, 2;
    return ($domain, $key);
}

1;

 view all matches for this distribution


MogileFS-Server

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN

          wrapper. (in particular, lighttpd and apache)  mogstored still
          exists for all its other misc admin/monitoring functions,
          but can then manage/configure apache/lighttpd child process(es).
          so far they're just stubbed out.

        * split mogstored into separate files per class, rather than one
          large script.

2007-04-24: Release version 2.10

        * bug from earlier refactoring:  changing some 'next' to 'return'

 view all matches for this distribution


Mojito

 view release on metacpan or  search on metacpan

files/syntax_highlight/prettify.js  view on Meta::CPAN

  var pr_commentPrefix = /^<\!--/;
  var pr_cdataPrefix = /^<!\[CDATA\[/;
  var pr_brPrefix = /^<br\b/i;
  var pr_tagNameRe = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;

  /** split markup into chunks of html tags (style null) and
    * plain text (style {@link #PR_PLAIN}), converting tags which are
    * significant for tokenization (<br>) into their textual equivalent.
    *
    * @param {string} s html where whitespace is considered significant.
    * @return {Object} source code and extracted tags.

 view all matches for this distribution


Mojo-CSV

 view release on metacpan or  search on metacpan

t/01-csv.t  view on Meta::CPAN

    my $sample = sample_csv();
    my $csv = Mojo::CSV->new;
    chomp( my $expected = path(CSV_FILE)->slurp );
    is $csv->text($sample), $expected, '->text on rows matches expectations';

    my @lines = split m{$/}, $expected;
    is $csv->text($sample->[$_]),
        $lines[$_], '->text on single row matches expectations on row ' . $_
            for 0 .. $#$sample;
}

 view all matches for this distribution


Mojo-Feed

 view release on metacpan or  search on metacpan

t/samples/plasmastrum.xml  view on Meta::CPAN

  <p>I don’t like <code>git send-email</code>. The command assembles and sends mail all in one go, so you have to know what it will do blindly. Running <code>git format-patch</code> manually first only helps a little, since <code>git send-email</co...
  <p>Unfortunately the patchmail I do send every once in a while goes to places with many subscribers, and I’m unwilling to rattle their inboxes with my (repeat!) learning process. I want to be sure I’ll send exactly the mail I mean to, on the ve...
  <p>I also have <a href="http://msmtp.sourceforge.net/">msmtp</a> set up on my home server with all the details of my <abbr title="Simple Mail Transfer Protocol">SMTP</abbr> accounts and really don’t want to maintain another copy of that informati...
  <p>So for me, the answer is to avoid <code>git send-email</code> entirely.</p>
  <p>The key realisation is that once a mail is properly formatted,  sending it is nothing more than piping it to <code>/usr/bin/sendmail</code> (or whatever equivalent you employ) – so you actually need only <code>git format-patch</code>.</p>
  <p>There is just one little wrinkle to take care of: the “<code>From </code>” line it generates needs to be removed before its output can be piped to <code>sendmail</code>. This is easily done using <code>formail</code>, which can also split mb...
  <p>Bottom line, this replicates <code>git send-email</code>:</p>
  <pre><code class="ft-sh">git format-patch --stdout <i>origin</i> | formail -I 'From ' -s sendmail -t</code></pre>
  <p>(Obviously, you season it with <code>--to <i>whomever@example.net</i></code> <abbr title="et ceterea">etc.</abbr> to taste.)</p>
  <p>Here, <code>git format-patch</code> produces an mbox-format mail folder, which <code>formail</code> splits into individual mails (“<code>-s …</code>”), and for each mail, deletes the <code>From</code> line (“<code>-I 'From '</code>”) a...
  <p>But note what I gained here:</p>

 view all matches for this distribution


Mojo-Pg-Che

 view release on metacpan or  search on metacpan

t/02-connection.t  view on Meta::CPAN

#~ my $mojo_db_class = 'Mojo::Pg::Database';
my $dbi_db_class = 'DBI::db';

plan skip_all => 'set env TEST_PG="dbname=<...>/<pg_user>/<passwd>" to enable this test' unless $ENV{TEST_PG};

my ($dsn, $user, $pw) = split m|[/]|, $ENV{TEST_PG};

# 1
my $pg1 = $class->connect($dsn, $user, $pw, {PrintWarn => 0,},);
my $options =   {
  AutoCommit => 1,

 view all matches for this distribution


Mojo-UserAgent-Cached

 view release on metacpan or  search on metacpan

lib/Mojo/UserAgent/Cached.pm  view on Meta::CPAN

    if ($body =~ m{\A (?: DELETE | GET | HEAD | OPTIONS | PATCH | POST | PUT ) \s }gmx) {
        my $code_msg_headers;
        my $code_msg;
        my $http;
        my $msg;
        (undef, $code_msg_headers, $body) = split m{(?:\r\n|\n){2,}}mx, $body,             3; ## no critic (ProhibitMagicNumbers)
        ($code_msg, $headers)             = split m{(?:\r\n|\n)}mx,     $code_msg_headers, 2;
        ($http, $code, $msg)              = $code_msg =~ m{ \A (?:(\S+) \s+)? (\d+) \s+ (.*) \z}mx;

        $headers = Mojo::Headers->new->parse("$headers\n\n")->to_hash;
    }

 view all matches for this distribution


MojoMojo

 view release on metacpan or  search on metacpan

lib/MojoMojo/Controller/Gallery.pm  view on Meta::CPAN

=cut

sub tag : Local {
    my ( $self, $c, $photo, $tagname ) = @_;
    ($tagname) = $tagname =~ m/([\w\s]+)/;
    foreach my $tag ( split m/\s/, $tagname ) {
        if (
            $tag
            && !$c->model("DBIC::Tag")->search(
                photo  => $photo,
                person => $c->user->obj->id,

 view all matches for this distribution


Mojolicious-Che

 view release on metacpan or  search on metacpan

lib/Mojo/Base/Che.pm  view on Meta::CPAN

      #~ $flag = $1;
      #~ push @flags, $flag
        #~ and next
        #~ unless $flag eq '-lib';

      #~ unshift @_, split m'[:;]+', $it # -lib:foo;bar
        #~ if $it;

      #~ next;
    #~ } elsif (!$flag || $flag ne '-lib') { # non controll
      #~ push @flags, $it;

 view all matches for this distribution


Mojolicious-Plugin-AssetPack

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/AssetPack/Asset.pm  view on Meta::CPAN

$TAG_TEMPLATE{$_}  = [qw(source src)] for qw(mp3 mp4 ogg ogv webm);

has checksum => sub { Mojolicious::Plugin::AssetPack::Util::checksum(shift->content) };
has format   => sub {
  my $self = shift;
  my $name = $self->url =~ /^https?:/ ? Mojo::URL->new($self->url)->path->[-1] : (split m!(\\|/)!, $self->url)[-1];

  return $name =~ /\.(\w+)$/ ? lc $1 : '';
};

has minified => sub { shift->url =~ /\bmin\b/ ? 1 : 0 };

lib/Mojolicious/Plugin/AssetPack/Asset.pm  view on Meta::CPAN

    $qs   =~ s!\W!_!g;
    $name =~ s!\.\w+$!!;
    $name .= "_$qs" if $qs;
  }
  else {
    $name = (split m!(\\|/)!, $self->url)[-1];
    $name =~ s!\.\w+$!!;
  }

  return $name;
};

 view all matches for this distribution


Mojolicious-Plugin-Breadcrumbs

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Breadcrumbs.pm  view on Meta::CPAN

                           # $Crumbs_Map and not needing crumbs;

            my $path = '';
            my @crumbs;
            for my $crumb (
                '', grep length, split m{/}, $c->url_for->to_string
            ) {
                $path .= ($path eq '/' ? '' : '/') . $crumb;
                push @crumbs, {
                    path => $path,
                    text => $Crumbs_Map->{ $path }

 view all matches for this distribution


Mojolicious-Plugin-ContextResources

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/ContextResources.pm  view on Meta::CPAN

    my ($c) = @_;

    my @path;
    my $stash = $c->stash;
    if( $stash->{'controller'} && $stash->{'action'} ) {
        push @path, split m{[/\-]}, $stash->{'controller'};
        push @path, $stash->{'action'};
    } elsif( $stash->{'mojo.captures'}{'template'} ) {
        push @path, $stash->{'mojo.captures'}{'template'};
    }
    return @path;

 view all matches for this distribution


Mojolicious-Plugin-FeedReader

 view release on metacpan or  search on metacpan

t/samples/plasmastrum.xml  view on Meta::CPAN

  <p>I don’t like <code>git send-email</code>. The command assembles and sends mail all in one go, so you have to know what it will do blindly. Running <code>git format-patch</code> manually first only helps a little, since <code>git send-email</co...
  <p>Unfortunately the patchmail I do send every once in a while goes to places with many subscribers, and I’m unwilling to rattle their inboxes with my (repeat!) learning process. I want to be sure I’ll send exactly the mail I mean to, on the ve...
  <p>I also have <a href="http://msmtp.sourceforge.net/">msmtp</a> set up on my home server with all the details of my <abbr title="Simple Mail Transfer Protocol">SMTP</abbr> accounts and really don’t want to maintain another copy of that informati...
  <p>So for me, the answer is to avoid <code>git send-email</code> entirely.</p>
  <p>The key realisation is that once a mail is properly formatted,  sending it is nothing more than piping it to <code>/usr/bin/sendmail</code> (or whatever equivalent you employ) – so you actually need only <code>git format-patch</code>.</p>
  <p>There is just one little wrinkle to take care of: the “<code>From </code>” line it generates needs to be removed before its output can be piped to <code>sendmail</code>. This is easily done using <code>formail</code>, which can also split mb...
  <p>Bottom line, this replicates <code>git send-email</code>:</p>
  <pre><code class="ft-sh">git format-patch --stdout <i>origin</i> | formail -I 'From ' -s sendmail -t</code></pre>
  <p>(Obviously, you season it with <code>--to <i>whomever@example.net</i></code> <abbr title="et ceterea">etc.</abbr> to taste.)</p>
  <p>Here, <code>git format-patch</code> produces an mbox-format mail folder, which <code>formail</code> splits into individual mails (“<code>-s …</code>”), and for each mail, deletes the <code>From</code> line (“<code>-I 'From '</code>”) a...
  <p>But note what I gained here:</p>

 view all matches for this distribution


Mojolicious-Plugin-Human

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Human.pm  view on Meta::CPAN


    $app->helper(human_phones => sub {
        my ($self, $str, $country, $add) = @_;
        return '' unless $str;

        my @phones = split m{$REGEXP_SEPARATOR}, $str;
        my $phones = join ', ' => grep { $_ } map {
            $self->human_phone( $_, $country, $add )
        } @phones;

        return Mojo::ByteStream->new($phones);

 view all matches for this distribution


Mojolicious-Plugin-PlainRoutes

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/PlainRoutes.pm  view on Meta::CPAN

		eol        => qr{ \n }x,
		space      => qr{ [^\S\n]+ }x,
	);

	my @words = grep { defined && length }
	              split m{( $grammar{comment}
	                      | $grammar{verb}
	                      | $grammar{path}
	                      | $grammar{arrow}
	                      | $grammar{scope}
	                      | $grammar{action}

 view all matches for this distribution


Mojolicious-Plugin-RoutesAuthDBI

 view release on metacpan or  search on metacpan

t/02-schema.t  view on Meta::CPAN



subtest 'need_conn' => sub {
  plan skip_all => 'set env TEST_CONN_PG="DBI:Pg:dbname=<db>/<pg_user>/<passwd>" to enable this test'
    unless $ENV{TEST_CONN_PG};
  my ($dsn, $user, $pw) = split m|[/]|, $ENV{TEST_CONN_PG};
  require DBI;
  my $dbh = DBI->connect($dsn, $user, $pw);
  is $dbh->do($create), '0E0', 'create schema tables';
};

 view all matches for this distribution


Mojolicious

 view release on metacpan or  search on metacpan

lib/Mojo/Util.pm  view on Meta::CPAN

sub network_contains {
  my ($cidr, $addr) = @_;
  return undef unless length $cidr && length $addr;

  # Parse inputs
  my ($net, $mask) = split m!/!, $cidr, 2;
  my $v6 = $net =~ /:/;
  return undef if $v6 xor $addr =~ /:/;

  # Convert addresses to binary
  return undef unless $net  = inet_pton($v6 ? AF_INET6 : AF_INET, $net);

 view all matches for this distribution


MooX-Options

 view release on metacpan or  search on metacpan

lib/MooX/Options.pm  view on Meta::CPAN

=back

=head2 Decouple autorange and autosplit

Until 4.023, any option which had autorange enabled got autosplit enabled, too.
Since autosplit might not work correctly and for a reasonable amount of users
the fact of

  $ my-tool --range 1..5

is all they desire, autosplit will enabled only when the dependencies of

 view all matches for this distribution


MooseX-MakeImmutable

 view release on metacpan or  search on metacpan

lib/MooseX/MakeImmutable/Finder.pm  view on Meta::CPAN

    $self->{exclude} = [ $self->{exclude} ] if $self->{exclude} && ref $self->{exclude} ne "ARRAY";

    my $manifest = $given->{manifest};
    my (@manifest, @recursive_manifest, @search_manifest);

    for my $package (split m/\n+/, $manifest) {
        chomp $package;
        $package =~ s/^\s*//;
        $package =~ s/\s*$//;
        next unless $package;
        next if $package =~ m/^#/;

 view all matches for this distribution


MooseX-Scaffold

 view release on metacpan or  search on metacpan

lib/MooseX/Scaffold.pm  view on Meta::CPAN


    $count = 0 unless defined $count && length $count;

    return $package unless $count >= 1;
    
    my @package = split m/::/, $package;
    pop @package while $count--;
    push @package, $replacement if defined $replacement && length $replacement;
    return join '::', @package;
}

 view all matches for this distribution


MooseX-Types-Moose-MutualCoercion

 view release on metacpan or  search on metacpan

lib/MooseX/Types/Moose/MutualCoercion.pm  view on Meta::CPAN


coerce LinesToArrayRef,
    from Str,
        via {
            ( my $new_line = $/ ) =~ s{(.)}{[$1]}xmsg;
            [ split m{ (?<= $new_line ) }xms, $_ ];
        };

coerce HashRefToArrayRef,
    from HashRef,
        via {

 view all matches for this distribution


Mozilla-Persona

 view release on metacpan or  search on metacpan

lib/Mozilla/Persona/Check.pm  view on Meta::CPAN

{   my %args = @_;

    my $identity = $args{identity} or panic;
    my $password = $args{password} or panic;

    my ($user, $domain) = split m/\@/, $identity, 2;
    defined $domain
        or error __x"identity should have a form like: username\@example.com";

    my $website  = URI->new("https://$domain");
    check_browserid_file $website;

 view all matches for this distribution


MsOffice-Word-Surgeon

 view release on metacpan or  search on metacpan

lib/MsOffice/Word/Surgeon/PackagePart.pm  view on Meta::CPAN

    </w:t>                            # closing tag for text
  ]x;

  # split XML content into run fragments
  my $contents      = $self->contents;
  my @run_fragments = split m[$run_regex], $contents, -1; # -1 : don't strip trailing items
  my @runs;

  # build internal RUN objects
 RUN:
  while (my ($xml_before_run, $props, $run_contents) = splice @run_fragments, 0, 3) {
    $run_contents //= '';

    # split XML of this run into text fragmentsn
    my @txt_fragments = split m[$txt_regex], $run_contents, -1; # -1 : don't strip trailing items
    my @texts;

    # build internal TEXT objects
  TXT:
    while (my ($xml_before_text, $txt_contents) = splice @txt_fragments, 0, 2) {

 view all matches for this distribution


Music-Abc-DT

 view release on metacpan or  search on metacpan

lib/Music/Abc/DT.pm  view on Meta::CPAN


    my $gchord = $sym->{text};
    # Multiple chords per element can be notated writing two or more consecutive
    # chords before the same element, or using the separating characters ; or \n
    $gchord =~ tr/;/\n/;
    my @gchords = split m/\n/xms, $gchord;

    # stops the search after the first match; the first gchords have priority
    # eg: 'gchord::F'
    foreach my $gc (@gchords) {
      $proc = $abch{ "gchord::$gc" } || $proc;

 view all matches for this distribution


Music-Chord-Namer

 view release on metacpan or  search on metacpan

lib/Music/Chord/Namer.pm  view on Meta::CPAN

	
	shift(@notenumbers);  # get rid of bass note, incase it's a split!
			# ... and do it all again!
	push @inversions,
		{name => $value2note[($notevalues{$notes[0]}) % 12], notes => [map { $_ - $notenumbers[0] } @notenumbers], split => $notes[0], comment => 'split 1'},
		{name => $value2note[($notevalues{$notes[0]} - 3) % 12], notes => [map { $_ - $notenumbers[0] + 3 } @notenumbers], split => $notes[0], comment => 'split m3'},
		{name => $value2note[($notevalues{$notes[0]} - 4) % 12], notes => [map { $_ - $notenumbers[0] + 4 } @notenumbers], split => $notes[0], comment => 'split 3'},
		{name => $value2note[($notevalues{$notes[0]} + 5) % 12], notes => [map { $_ - $notenumbers[0] - 5 } @notenumbers], split => $notes[0], comment => 'split 5'},
		{name => $value2note[($notevalues{$notes[0]} + 2) % 12], notes => [map { $_ - $notenumbers[0] - 2 } @notenumbers], split => $notes[0], comment => 'split m7'};
	
# ok, here's how it works:

# There are these notes:

 view all matches for this distribution


MyCPAN-Indexer

 view release on metacpan or  search on metacpan

t/compile.t  view on Meta::CPAN


BEGIN {
	open my($fh), "<", "MANIFEST" or die "Could not open MANIFEST! $!";
	
	@scripts = 
		map  { catfile( split m|/| ) }
		grep { /\.pl$/ } 
		map  { chomp; $_ } 
		<$fh>;
	}

 view all matches for this distribution


MySQL-Admin

 view release on metacpan or  search on metacpan

htdocs/src-min/mode-php.js  view on Meta::CPAN

define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={s...

 view all matches for this distribution


NCAR

 view release on metacpan or  search on metacpan

test/agex09.t  view on Meta::CPAN

{
  local $/ = undef;
  my $t = <DAT>;
  $t =~ s/^\s*//o;
  $t =~ s/\s*$//o;
  @t =split m/\s+/o, $t;
}
close DAT;
for my $J ( 1 .. 400 ) {
  set( $YDAT, $J-1, shift( @t ) );
}

 view all matches for this distribution


NET-MitM

 view release on metacpan or  search on metacpan

lib/NET/MitM.pm  view on Meta::CPAN

  return undef;
}

sub _message_from_client_to_server(){ # TODO Too many too similar sub names, some of which maybe should be public
  my $this=shift;
  # optional sleep to reduce risk of split messages
  _pause($this->{defrag_delay}) if $this->{defrag_delay};
  # It would be possible to be more agressive by repeatedly waiting until there is a break, but that would probably err too much towards concatenating seperate messages - especially under load.
  my $msg;
  sysread($this->{CLIENT},$msg,10000);
  # (0 length message means connection closed)

 view all matches for this distribution


NKC-Transform-BIBFRAME2MARC

 view release on metacpan or  search on metacpan

BIBFRAME2MARC/Utils.pm  view on Meta::CPAN

		$dir = dist_dir('NKC-Transform-BIBFRAME2MARC');
	}

	opendir(my $dh, $dir) or err "Cannot open directory.";
	my @versions = sort {
			my ($a1, $a2, $a3) = split m/\./ms, $a;
			my ($b1, $b2, $b3) = split m/\./ms, $b;
			$a1 <=> $b1 or $a2 <=> $b2 or $a3 <=> $b3;
		}
		map { -f catfile($dir, $_) && m/^bibframe2marc-(.+)\.xsl$/ms ? $1 : () }
		readdir($dh);
	closedir($dh);

 view all matches for this distribution


( run in 1.830 second using v1.01-cache-2.11-cpan-71847e10f99 )