view release on metacpan or search on metacpan
lib/App/Device/Chip/sensor.pm view on Meta::CPAN
'adapter|A=s' => sub {
$ADAPTERDESC = $_[1];
undef $adapter;
},
'<>' => sub {
my ( $chiptype, $opts ) = split m/:/, $_[0], 2;
$adapter //= Device::Chip::Adapter->new_from_description( $ADAPTERDESC );
my %config = (
type => $chiptype,
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/dex view on Meta::CPAN
my $header_implicit = ($i == 0 and not $self->header);
my %args = (
implicit => $header_implicit,
);
if ($self->version_directive) {
my ($major, $minor) = split m/\./, $self->representer->schema->yaml_version;
$args{version_directive} = { major => $major, minor => $minor };
}
$self->emitter->document_start_event( \%args );
$self->init;
$self->check_references($docs[ $i ]);
scripts/dex view on Meta::CPAN
$value =~ s/\n/\n\n/g;
}
elsif ($style == YAML_SINGLE_QUOTED_SCALAR_STYLE) {
my $new_indent = $last->{indent} . (' ' x $self->indent);
$value =~ s/(\n+)/"\n" x (1 + (length $1))/eg;
my @lines = split m/\n/, $value, -1;
if (@lines > 1) {
for my $line (@lines[1 .. $#lines]) {
$line = $new_indent . $line
if length $line;
}
scripts/dex view on Meta::CPAN
}
sub _write {
my ($self, $yaml) = @_;
return unless length $yaml;
my @lines = split m/\n/, $yaml, -1;
my $newlines = @lines - 1;
$self->{line} += $newlines;
if (length $lines[-1]) {
if ($newlines) {
$self->{column} = length $lines[-1];
scripts/dex view on Meta::CPAN
my $value = defined $token->{orig} ? $token->{orig} : $token->{value};
push @list, map {
$_ =~ tr/\t/\t/
? { name => 'TAB', value => $_ }
: { name => $token->{name}, value => $_ }
} split m/(\t+)/, $value;
}
}
for my $i (0 .. $#list) {
my $token = $list[ $i ];
my $name = $token->{name};
scripts/dex view on Meta::CPAN
push @{ $self->events }, 'DOC';
push @{ $self->offset }, -1;
my $directive = $self->yaml_version_directive;
my %directive;
if ($directive) {
my ($major, $minor) = split m/\./, $self->yaml_version;
%directive = ( version_directive => { major => $major, minor => $minor } );
}
$self->callback->($self, 'document_start_event', {
name => 'document_start_event',
implicit => $implicit,
scripts/dex view on Meta::CPAN
}
elsif ($option eq '+loadcode') {
$loadcode = 1;
}
}
$tags = [split m/\+/, $tagtype];
}
my $perl_tag;
my %tagtypes;
scripts/dex view on Meta::CPAN
my ($float) = @$matches;
my $result = 0;
my $i = 0;
my $sign = 1;
$float =~ s/^-// and $sign = -1;
for my $part (reverse split m/:/, $float) {
$result += $part * ( 60 ** $i );
$i++;
}
$result = unpack F => pack F => $result;
return $result * $sign;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Easer/V1.pm view on Meta::CPAN
my ($v, $dirs) = File::Spec->splitpath($_, 'no-file');
[$v, File::Spec->splitdir($dirs)];
} @INC;
my %seen;
return map {
my @parts = split m{::}mxs, $_ . 'x';
substr(my $bprefix = pop @parts, -1, 1, '');
map {
my ($v, @dirs) = $_->@*;
my $dirs = File::Spec->catdir(@dirs, @parts);
if (opendir my $dh, File::Spec->catpath($v, $dirs, '')) {
lib/App/Easer/V1.pm view on Meta::CPAN
} ## end SEARCH: for my $expansion_for (...)
# if it *still* "starts" with '=', it's "inline" Perl code
return eval $executable if $executable =~ s{\A \s* = \s* }{}mxs;
my ($package, $sname) = split m{\#}mxs, $executable;
$sname = $default_subname unless defined $sname && length $sname;
# first try to see if the sub is already available in $package
if (my $s = $package->can($sname)) { return $s }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/FargateStack.pm view on Meta::CPAN
foreach my $task ( @{$service_tasks} ) {
my ( $image_digest, $task_definition_arn, $started_at, $last_status )
= @{$task}{qw(image_digest task_definition_arn started_at last_status)};
my $short_image_digest = abbrev( $image_digest, 16 );
my $short_task_definition_arn = ( split m{/}xsm, $task_definition_arn )[-1];
my $latest_task_definition_arn = $self->get_latest_task_definition($service_name);
my $latest_image_digest = $self->get_latest_image($service_name)->{imageDigest};
lib/App/FargateStack.pm view on Meta::CPAN
my $task_definition_status = choose {
return $self->maybe_color( green => 'Current' )
if $task_definition_arn eq $latest_task_definition_arn;
return $self->maybe_color( red => ( split m{/}xsm, $latest_task_definition_arn )[-1] );
};
$image_digest //= q{};
my $image_digest_status = choose {
view all matches for this distribution
view release on metacpan or search on metacpan
t/BaseData.t view on Meta::CPAN
($sigil, $name) = $obj->split_name('@loop');
is($sigil, '@', 'split array variable sigil'); # test 5
is($name, 'loop', 'split array variable name'); # test 6
($sigil, $name) = $obj->split_name('loop');
is($sigil, '', 'split module variable sigil'); # test 7
is($name, 'loop', 'split module variable name'); # test 8
};
#----------------------------------------------------------------------
# Check ref value
view all matches for this distribution
view release on metacpan or search on metacpan
run_for_example @_, qw# --home /home/rob/develop/App-ForExample/Eg --hostname eg.localhost --package Eg #
}
sub stdout_same_as (&$;$) {
my $run = shift;
my $file = file( split m/\/+/, shift );
my $explain = shift;
my $content = scalar $file->slurp;
unlike $content, qr/\bUsage: for-example\b/ unless $file =~ m/help/;
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/generate_index.pl view on Meta::CPAN
use WWW::RT::CPAN;
my ($github_user, $github_repo);
if (my $repo = $ENV{GITHUB_REPOSITORY}) {
($github_user, $github_repo) = split m{/}, $repo, 2;
} else {
die 'What repo are you?';
}
my $package_name = $github_repo;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Getconf.pm view on Meta::CPAN
my ($self, %opts) = @_;
$self = $static unless ref $self; # static call or non-static?
$opts{screen} ||= 80;
$opts{arg0} ||= (split m[/], $0)[-1];
$opts{synopsis} ||= "%0 [ options ... ]";
$opts{option_indent} ||= 2;
$opts{description_indent} ||= 6;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Git/Workflow/Command/BranchClean.pm view on Meta::CPAN
}
if ( $in_master || $too_old ) {
warn 'deleting ' . ($in_master ? 'merged' : 'old') . " branch $branch\n";
my ($remote, $name) = $branch =~ m{/} ? split m{/}, $branch, 2 : (undef, $branch);
if ( $option{tag} ) {
my $tag = $option{tag_prefix} . $name . $option{tag_suffix};
$workflow->git->tag(qw/-a -m /, "Converting '$name' to the tag '$tag'", $tag) if !$option{test};
}
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
return $_[1];
};
}
{
map { my ($pk, $vr) = split m/\s/; build_requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
Test::More
_END_
map { my ($pk, $vr) = split m/\s/; requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
Env::Path
Getopt::Long
Scalar::Util
_END_
}
if (-e 'inc/.author') {
my $all_from = join '/', 'lib', split m/-/, name . '.pm';
`perldoc -tF $all_from > README` if ! -e 'README' || (stat $all_from)[9] > (stat 'README')[9];
}
WriteAll;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
return $_[1];
};
}
{
map { my ($pk, $vr) = split m/\s/; build_requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
Test::Most
Directory::Scratch
_END_
map { my ($pk, $vr) = split m/\s/; requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
App::GitHub::FindRepository
Carp::Clan
Digest::SHA1
File::AtomicWrite
File::Temp
Makefile.PL view on Meta::CPAN
Term::Prompt
_END_
}
if (-e 'inc/.author') {
my $all_from = join '/', 'lib', split m/-/, name . '.pm';
`perldoc -tF $all_from > README` if ! -e 'README' || (stat $all_from)[9] > (stat 'README')[9];
}
WriteAll;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitHub/create.pm view on Meta::CPAN
# downloads Enable downloads
# The default is 'none'
# my %options;
# my @enable = split m/\s*,\s*/, $enable;
# for ( @enable ) {
# s/^\s*//, s/\s*$//;
# next unless $_;
# if ( m/^none$/i ) { undef %options }
# elsif ( m/^all$/i ) { %options = qw/ wiki 1 issues 1 downloads 1 / }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Gitc/UserLookup/LocalGroup.pm view on Meta::CPAN
# Users are local users in a specific group.
sub users {
my $group = project_config()->{ user_lookup_group };
return split m{,}, ( getgrnam( $group ) )[3]
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/wordle/ORIGINAL.pm view on Meta::CPAN
rough weigh uncut ladle strip craft minus dicey titan lucid vicar dress ditch
gypsy pasta taffy flame swoop aloof sight broke teary chart sixty wordy sheer
leper nosey bulge savor clamp funky foamy toxic brand plumb dingy butte drill
tripe bicep tenor krill worse drama hyena think ratio cobra basil scrum bused
phone court camel proof heard angel petal pouty throb maybe fetal sprig spine
shout cadet macro dodgy satyr rarer binge trend nutty leapt amiss split myrrh
width sonar tower baron fever waver spark belie sloop expel smote baler above
north wafer scant frill awash snack scowl frail drift limbo fence motel ounce
wreak revel talon prior knelt cello flake debug anode crime salve scout imbue
pinky stave vague chock fight video stone teach cleft frost prawn booty twist
apnea stiff plaza ledge tweak board grant medic bacon cable brawl slunk raspy
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/LXC/Container/Data/Debian.pm view on Meta::CPAN
$pkg or
fatal('can_t_determine_package_in__1__2', $_dpkg_status, $.);
my $key = lc($1);
my @dependencies =
map { s/ \([<=>]+ [^)]+\)$//; $_ }
split m/(?:, | \| )/, $2;
$self->{STATUS}{$pkg}{$key} = \@dependencies;
}
}
close $stat;
}
view all matches for this distribution
view release on metacpan or search on metacpan
Validator.pm view on Meta::CPAN
my $self = shift;
if (! defined $self->{'_opts'}->{'u'}) {
return ();
}
my @use_options = split m/,/, $self->{'_opts'}->{'u'};
my @use_plugins;
foreach my $use_option (@use_options) {
my ($type, $name) = split m/:/ms, $use_option, 2;
if ($type eq 'plugin') {
push @use_plugins, $name;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MatrixClient.pm view on Meta::CPAN
);
},
on_line => sub {
my ( $tab, $line ) = @_;
if( $line =~ s{^/}{} ) {
my ( $cmd, @args ) = split m/\s+/, $line;
if( my $code = $tab->can( "cmd_$cmd" ) ) {
$room->adopt_future( $tab->$code( @args ) );
}
else {
$self->do_command( $line, $tab );
lib/App/MatrixClient.pm view on Meta::CPAN
{
my $self = shift;
my ( $line, $tab ) = @_;
# For now all commands are simple methods on __PACKAGE__
my ( $cmd, @args ) = split m/\s+/, $line;
$tab->append_line(
String::Tagged->new( '$ ' . join " ", $cmd, @args )
->apply_tag( 0, -1, fg => "cyan" )
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MatrixTool/HTTPClient.pm view on Meta::CPAN
$req->header( Content_length => length $req->content );
}
if( $self->{print_request} ) {
print STDERR "Sending HTTP request to $params{server}\n";
print STDERR " $_\n" for split m/\n/, $req->as_string( "\n" );
}
my $path = $req->uri->path;
# Different kinds of request need resolving either as a client or as a
lib/App/MatrixTool/HTTPClient.pm view on Meta::CPAN
request => $req,
)->on_done( sub {
my ( $response ) = @_;
if( $self->{print_response} ) {
print STDERR "Received HTTP response:\n";
print STDERR " $_\n" for split m/\n/, $response->as_string( "\n" );
}
})->on_fail( sub {
my ( undef, $name, $response ) = @_;
if( $name eq "http" and $self->{print_response} ) {
print STDERR "Received HTTP response:\n";
print STDERR " $_\n" for split m/\n/, $response->as_string( "\n" );
}
});
} foreach => \@res;
});
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Mowyw.pm view on Meta::CPAN
}
sub p_bind {
my ($tokens, $meta) = @_;
my $contents = strip_ws(slurp_upto_token($tokens, 'TAG_END', $meta));
my ($var, $rest) = split m/\s+/, $contents, 2;
my $string = qr{(
'[^'\\]*(?>\\.[^'\\]*)*'
|"[^"\\]*(?>\\.[^"\\]*)*'
|[^"']\S*
)}x;
lib/App/Mowyw.pm view on Meta::CPAN
}
sub p_for {
my ($tokens, $meta) = @_;
my $contents = strip_ws(slurp_upto_token($tokens, 'TAG_END', $meta));
my ($iter, $in, $datasource) = split m/\s+/, $contents;
if (!defined $datasource || lc $in ne 'in' ){
parse_error(
q{Can't parse for statement. Syntax is [% for iterator_var in datasource %] ... [% endfor %]},
$meta->{FILES},
$tokens->[0],
lib/App/Mowyw.pm view on Meta::CPAN
sub resolve_var {
my ($name, $meta) = @_;
if ($name =~ m/\./){
my @parts = split m/\./, $name;
my $var = $meta->{VARS};
for (@parts){
if (!defined $var || !ref $var || reftype($var) ne 'HASH'){
unless ($meta->{NO_VAR_WARN}){
warn "\nCan't dereference '$name' at level '$_': not defined or not a hash\n";
lib/App/Mowyw.pm view on Meta::CPAN
}
sub p_readvar {
my ($tokens, $meta) = @_;
my $str = strip_ws(slurp_upto_token($tokens, 'TAG_END', $meta));
my ($name, $rest) = split m/\s+/, $str, 2;
my %options = parse_hash($rest, 'readvar', $meta);
my $c = resolve_var($name, $meta);
if (defined $options{escape} && lc $options{escape} eq 'html'){
return encode_entities($c);
lib/App/Mowyw.pm view on Meta::CPAN
my $tokens = shift;
my $meta = shift;
my $tag_content = shift @$tokens;
$tag_content = strip_ws($tag_content->[1]);
p_expect($tokens, "TAG_END", $meta);
my @t = split m/\s+/, $tag_content;
if (scalar @t != 2){
parse_error(
"Usage of syntaxfile tag: [[[syntaxfile <filename> <language>",
$meta->{FILES},
$tokens->[0],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ChordPro/Output/PDF/Song.pm view on Meta::CPAN
}
else {
$xt1 = $pr->text( $phrase, $x, $ytext, $ftext );
}
if ( $xt0 > $xt1 ) { # chord is wider
# Do we need to insert a split marker?
if ( $i < $n
&& demarkup($phrase) !~ /\s$/
&& demarkup($phrases[$i+1]) !~ /^\s/
# And do we have one?
&& ( my $marker = $ps->{'split-marker'} ) ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MusicExpo.pm view on Meta::CPAN
}
sub mp3info{
my $file=$_[0];
my %tag = map { encode 'UTF-8', $_ } %{MP3::Info::get_mp3tag $file};
my @trkn = split m#/#s, $tag{TRACKNUM} // '';
freeze +{
format => 'MP3',
title => $tag{TITLE},
artist => $tag{ARTIST},
view all matches for this distribution
view release on metacpan or search on metacpan
public/javascripts/ace/mode-php.js view on Meta::CPAN
"int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])",
"* Sends an email message with MIME scheme"
],
"mb_split": [
"array mb_split(string pattern, string string [, int limit])",
"split multibyte string into array by regular expression"
],
"mb_strcut": [
"string mb_strcut(string str, int start [, int length [, string encoding]])",
"Returns part of a string"
],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Netdisco/SSHCollector/Platform/Aruba.pm view on Meta::CPAN
chomp @data;
my @arpentries;
# 172.16.20.15 00:24:b2:69:86:7d vlan interface state
foreach my $line (@data) {
my @fields = split m/\s+/, $line;
push @arpentries, { mac => $fields[1], ip => $fields[0] };
}
return @arpentries;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Oozie/Deploy/Template.pm view on Meta::CPAN
my $maybe_log_line = sub {
my $config_line = shift || return;
if ( $config_line =~ m{ \A copy }xms ) {
$logger->info(
sprintf 'Files matching this pattern will be copied as-is: /%s/',
trim +(split m{ [=] }xms, $config_line, 2)[LAST_ELEM]
);
}
return;
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/PAUSE/cleanup.pm view on Meta::CPAN
my $document = join "\n", @document;
my $delete_undelete = Term::EditorEdit->edit( document => $document, process => sub {
my $edit = shift;
my ( @delete, @undelete );
my @content = split m/\n/, $edit->content;
for my $line ( @content ) {
next unless $line =~ m/^\s*(delete|undelete)\s*(\S+)/i;
if ( lc $1 eq 'delete' ) { push @delete, $2 }
else { push @undelete, $2 }
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/PM/Announce/Util.pm view on Meta::CPAN
$dtime->set_time_zone("UTC") if blessed $dtime && ($dtime = $dtime->clone);
my $now = DateTime->now;
my $age_delta = DateCalc(ParseDate($dtime.""), ParseDate($now.""));
my ($week, $day, $hour, $minute, $second) = split m/:/, scalar Delta_Format($age_delta, 2, "\%wv:\%dv:\%hv:\%mv:\%sv");
my $age;
if ($week) {
$age = scalar Delta_Format($age_delta, 2, "\%wh weeks");
}
elsif ($day) {
view all matches for this distribution
view release on metacpan or search on metacpan
return 1;
}
$self->{'_filename_or_stdin'} = $ARGV[0];
# No simple elements.
my @no_simple = split m/,/ms, $self->{'_opts'}->{'s'};
# Tags object.
my $tags;
my %params = (
'no_simple' => \@no_simple,
view all matches for this distribution
view release on metacpan or search on metacpan
CopyrightYears.pm view on Meta::CPAN
}
sub _update_pod {
my ($self, $file) = @_;
my @sections = split m/,/, $self->{'_opts'}->{'s'};
my $cy = Pod::CopyrightYears->new(
$self->{'_opts'}->{'d'} ? ('debug' => 1) : (),
'pod_file' => $file,
'section_names' => \@sections,
);
view all matches for this distribution
view release on metacpan or search on metacpan
t/10-controller_methods.t view on Meta::CPAN
print $fh $contents;
close $fh;
my $ret = `$^X $filename command`;
my @ret = split m{$/}, $ret;
is(scalar (@ret), 23);
is($ret[0], 'Available: 6');
is($ret[1], 'andanotherone:ok');
is($ret[2], 'anothercommand:ok');
is($ret[3], 'command:ok');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SD/CLI/Command/Publish.pm view on Meta::CPAN
my @links;
# we nned to turn every link into absolute, here is to find out dir info
# e.g. if $current_url is '/foo/bar/baz.html', @dirs will be qw/foo bar/
my @dirs = grep { $_ } split m{/}, $current_url;
# pop the page name like history.html
pop @dirs;
for my $link ( keys %$all_links ) {
next unless $link;
view all matches for this distribution