view release on metacpan or search on metacpan
lib/Devel/EnforceEncapsulation.pm view on Meta::CPAN
# get a list of overloadable derefs ('%{}', '@{}', '${}', ...)
sub _ops {
my $pkg = shift;
## no critic(ProhibitPackageVars)
return split m/\s/xms, $overload::ops{dereferencing};
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/IPerl/Plugin/EnvironmentModules.pm view on Meta::CPAN
return $stderr;
}
sub list_array {
my $self = shift;
my @lines = split m{\n}, $self->list || '';
return [
grep { length }
map { split m{(?:\s*\d+\)\s)} } @lines[1.. $#lines]
];
}
sub new { bless {}, ref($_[0]) || $_[0]; }
lib/Devel/IPerl/Plugin/EnvironmentModules.pm view on Meta::CPAN
sub search {
my ($self, $query) = @_;
my $regex = ref($query) eq 'Regexp' ? $query : qr{\Q$query\E};
my $hits =
join $/ => sort { lc($a) cmp lc($b) }
grep { m/$regex/ } split m{(?:$/|\s+)}, $self->avail || '';
return $hits || 'no match';
}
sub show {
shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/IPerl/Plugin/Perlbrew.pm view on Meta::CPAN
eval "no lib split ':', q[$env{PERL5LIB}];";
warn $@ if $@; ## uncoverable branch true
if ($self->unload) {
my $path_re = qr{\Q$env{PERL5LIB}\E};
for my $module_path(keys %INC) {
## autosplit modules
next if $module_path =~ m{\.(al|ix)$} && delete $INC{$module_path};
## global destruction ?
next if not defined $INC{$module_path};
## FatPacked ?
next if ref($INC{$module_path});
view all matches for this distribution
view release on metacpan or search on metacpan
bin/pmat-leakreport view on Meta::CPAN
my $df = $pmat->dumpfile;
foreach my $svkey ( nsort_by { $candidates{$_} } keys %candidates ) {
my $findex = $candidates{$svkey};
my ( $addr ) = split m/:/, $svkey;
my $sv = $df->sv_at( $addr );
printf "LEAK[%d] %s\n",
$findex, $sv->desc_addr;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/WxProf/Reader/DProf.pm view on Meta::CPAN
or next;
$header--;
}
# print $line;
chomp $line;
my @field_from = split m{\s}x , $line;
if ($field_from[0] eq '+') {
# skip old-style lines
next if ($field_from[1] eq '&');
# enter
lib/Devel/WxProf/Reader/DProf.pm view on Meta::CPAN
}
elsif ($field_from[0] eq '@') {
# time
# print $line,"\n";
my @time_from = split m{\s}x, $line;
$elapsed += $time_from[3];
}
elsif ($field_from[0] eq '&') {
# register
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Developer/Dashboard/CLI/OpenFile.pm view on Meta::CPAN
my $rank = 0;
for my $pattern (@patterns) {
next if !defined $pattern || $pattern eq '';
my $regex = _compile_open_file_regex($pattern);
my $score = 50;
my @components = grep { defined && $_ ne '' } split m{[\\/]+}, $match_path;
if ( $basename =~ /\A(?:$pattern)\z/i ) {
$score = 0;
}
elsif ( $stem =~ /\A(?:$pattern)\z/i ) {
lib/Developer/Dashboard/CLI/OpenFile.pm view on Meta::CPAN
my (%args) = @_;
my $paths = $args{paths} || die 'Missing path registry';
my $archive = $args{archive} || die 'Missing archive path';
my $entry = $args{entry} || die 'Missing archive entry';
my $digest = md5_hex( join "\0", $archive, $entry );
my @parts = grep { defined && $_ ne '' } split m{/+}, $entry;
return File::Spec->catfile(
$paths->cache_root,
'open-file',
'java-sources',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/AVR/UPDI.pm view on Meta::CPAN
my %partinfos;
{
while( readline DATA ) {
m/^#/ and next;
chomp;
my ( $name, $signature, @fields ) = split m/\|/, $_;
$signature = pack "H*", $signature;
my $fuses = [ map { length $_ ? $_ : undef } split m/,/, pop @fields ];
m/^0x/ and $_ = hex $_ for @fields;
my $partinfo = Device::AVR::UPDI::_PartInfo->new_values( $name, $signature, @fields, $fuses );
$partinfos{lc $name} = $partinfo;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/avr_hvsp view on Meta::CPAN
package main::Fileformat::Immediate {
use base 'main::Fileformat';
sub open_out { die "This format does not support being written\n" }
sub open_in {
my $class = shift;
my $bytes = join "", map { chr( m/^0/ ? hex : $_ ) } split m/[ ,]+/, $_[0];
return bless \$bytes, $class;
}
sub input {
return ${+shift};
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/uart-hello.pl view on Meta::CPAN
);
my $uart = $pirate->enter_mode( "UART" )->get;
my $config = shift // "9600,8,n,1";
my ( $baud, $bits, $parity, $stop ) = split m/,/, $config;
$uart->configure(
open_drain => 0,
baud => $baud,
bits => $bits,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/CableModem/Motorola/SB4200.pm view on Meta::CPAN
{ Decode => 1, Trim => 1, Chomp => 1 },
)->parse( $raw );
my $di = $list{dhcp_information};
$list{dhcp_information} = {};
foreach my $info ( split m{ \r?\n }xmsi, $di ) {
my($name, $value) = split m{ : \s+ }xms, $info;
my($num, $type, $other) = split m{ \s+ }xms, $value;
my $has_type = defined $num && defined $type && ! defined $other;
$list{dhcp_information}->{ $name } = $has_type
? { value => $num, type => $type }
: { value => $value }
;
lib/Device/CableModem/Motorola/SB4200.pm view on Meta::CPAN
foreach my $v (
\@up{ qw( frequency power_level symbol_rate ) },
\@down{ qw( frequency power_level signal_to_noise_ratio ) },
) {
my($value, $unit, $status) = split m{\s+}xms, ${$v};
${$v} = {
value => $value,
unit => $unit,
};
${$v}->{status} = $status if defined $status;
lib/Device/CableModem/Motorola/SB4200.pm view on Meta::CPAN
priority => shift @{ $cols },
code => shift @{ $cols },
message => shift @{ $cols },
};
my $cur = $logs[-1];
my($pn,$ps) = split m/\-/xms, $cur->{priority};
$cur->{priority} = {
code => $pn,
string => $ps,
};
$cur->{time} = undef if $cur->{time} eq '************';
lib/Device/CableModem/Motorola/SB4200.pm view on Meta::CPAN
}
else {
croak "Can not get version from $self->{page_help} output: $raw"
};
my %rv;
foreach my $vs ( split m/ \r? \n /xms, $self->_trim( $v ) ) {
my($name, $value) = split m/ : \s+ /xms, $vs;
($name, undef) = split m/ \s+ /xms, $name;
$rv{ lc $name } = $value;
}
my @soft = split m/ \- /xms, $rv{software};
$rv{software} = {
model => shift @soft,
version => shift @soft,
string => join( q{-}, @soft ),
};
view all matches for this distribution
view release on metacpan or search on metacpan
examples/tinyfuse.pl view on Meta::CPAN
$efuse = ( $has_efuse ? $avr->read_efuse->get : "" ),
$avr->all_power(0)->get;
}
else {
( $lfuse, $hfuse, $efuse ) = map { chr hex } split m/:/, $FUSEVALUES;
}
my %fusevals = $fuseinfo->unpack( join "", $lfuse, $hfuse, $efuse );
$fuselabel->set_text( sprintf "Fuses: %v02x", $lfuse.$hfuse.$efuse );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Chip/CC1101.pm view on Meta::CPAN
{
while( readline DATA ) {
chomp;
next if m/^#/;
my ( $name, $fields ) = split m/\|/, $_;
$PRESET_MODES{$name} = +{
map { m/(.*?)=(.*)/ } split m/,/, $fields
};
}
%BANDS = (
"433MHz" => {
view all matches for this distribution
view release on metacpan or search on metacpan
examples/ina219-tickit-ui.pl view on Meta::CPAN
$hbox->add( $_, expand => 1 ) for @digits;
$hbox->add( Tickit::Widget::SegmentDisplay->new(
type => "symb",
value => $_
), expand => 1 ) for split m//, $units;
return $self;
}
sub set_value
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Chip/MAX7219.pm view on Meta::CPAN
Paul Evans <leonerd@leonerd.org.uk>
=cut
while( readline DATA ) {
my ( $hex, $segments ) = split m/=/;
my $bits = 0;
substr( $segments, $_, 1 ) eq "." and $bits += 1 << $_ for 0 .. 6;
$hex2bits{$hex} = $bits;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Chip/NoritakeGU_D.pm view on Meta::CPAN
};
}
sub INT_COMMAND ( $name, $min, $max, @bytes )
{
my $shortname = ( split m/_/, $name )[-1];
my $lastbyte = pop @bytes;
no strict 'refs';
*$name = method ( $value ) {
lib/Device/Chip/NoritakeGU_D.pm view on Meta::CPAN
sub ENUM_COMMAND ( $name, $values, @bytes )
{
my @values = @$values;
my $shortname = ( split m/_/, $name )[-1];
my $lastbyte = pop @bytes;
no strict 'refs';
*$name = method ( $value ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Chip/PMS5003.pm view on Meta::CPAN
my @data = unpack( "s>*", substr $buf, 4, 28 );
my $got_checksum = pop @data;
my $want_checksum = 0;
$want_checksum += ord for split m//, substr $buf, 0, 30;
if( $got_checksum != $want_checksum ) {
# Checksum failed
goto next_packet;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Chip/SSD1306.pm view on Meta::CPAN
$_framebuffer or
_framebuffer_new( $_framebuffer, $_rows, $_columns );
# TODO: more efficient in XS, somehow...?
for( ; @lines; $y++ ) {
my @pixels = split m//, shift @lines;
@pixels or next;
my $x = $x0;
for( ; @pixels; $x++ ) {
my $p = shift @pixels;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/nRF24L01+_PRX.pl view on Meta::CPAN
'r|rate=s' => \(my $RATE = "2M"),
'D|dpl' => \(my $DPL = 0),
'W|width=i' => \(my $PW = 1),
) or exit 1;
my $AW = scalar( split m/:/, $ADDRESS );
$AW >= 3 and $AW <= 5 or die "Invalid address - must be 3 to 5 octets\n";
$RATE =~ s/M$/000000/i;
$RATE =~ s/k$/000/i;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Chip.pm view on Meta::CPAN
use constant true => (1 == 1);
sub _parse_options ( $, $str )
{
return map { m/^([^=]+)=(.*)$/ ? ( $1 => $2 ) : ( $_ => true ) }
split m/,/, $str // "";
}
=head2 mount_from_paramstr
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/FTDI/I2C.pm view on Meta::CPAN
}
else {
push @$more_f, $f;
return Future->done;
}
} foreach => [ split m//, $data ],
while => sub { !shift->failure };
}
use constant { WRITE => 0, READ => 1 };
view all matches for this distribution
view release on metacpan or search on metacpan
# Parse configuration.
sub parse {
my ($self, $data) = @_;
$self->_default;
my $stay = 0;
foreach my $line (split m/\n/ms, $data) {
if ($line =~ m/^\s*#/ms || $line =~ m/^\s*$/ms) {
next;
}
if (($stay == 0 || $stay == 1)
&& $line =~ m/^\s*(\w+)\s*=\s*"?(\w+)"?\s*$/ms) {
# Host in host table.
} elsif ($stay == 2
&& $line =~ m/^\s*(\w+)\s*=\s*\(([\d\.\w\s,]+)\)\s*$/ms) {
$self->{'host_table'}->{$1} = [split m/\s*,\s*/ms, $2];
# Symbolic names in host table.
} elsif ($stay == 2
&& $line =~ m/^\s*(\w+)\s*=\s*([\w\s,]+)\s*$/ms) {
$self->{'host_table_symb'}->{$1}
= [split m/\s*,\s*/ms, $2];
# Begin of AE table.
} elsif ($stay == 1 && $line =~ m/^\s*AETable\s+BEGIN\s*$/ms) {
$stay = 3;
# AE item.
} elsif ($stay == 3
&& $line =~ m/^\s*(\w+)\s+([\/\w]+)\s+(\w+)\s+\(([^)]+)\)\s+(.*)$/ms) {
my ($maxStudies, $maxBytesPerStudy)
= split m/\s*,\s*/ms, $4;
$self->{'ae_table'}->{$1} = {
'StorageArea' => $2,
'Access' => $3,
'Quota' => {
'maxStudies' => $maxStudies,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Directory/Deploy/Manifest.pm view on Meta::CPAN
if (1 == @_ || ref $_[0] eq 'SCALAR') {
my $parse = shift;
croak "More than one argument passed to include" if @_;
my $parser = $self->include_parser;
$parse = $$parse if ref $_[0] eq 'SCALAR';
$parser->( $self, $_ ) for split m/\n/, $parse;
}
else {
while (@_) {
my $path = shift;
my $value = shift;
lib/Directory/Deploy/Manifest.pm view on Meta::CPAN
#sub _include_list {
# my $self = shift;
# my $list = shift;
# for (split m/\n/, $list) {
# $self->parser->($self);
# }
#}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Dzpl/Parser.pm view on Meta::CPAN
die "Missing input" unless defined $input && length $input;
my @stash;
my $manifest = [];
push @stash, { phase => 'runtime', type => $importance, manifest => $manifest };
for my $line ( split m/\n/, $input ) {
s/^\s*//, s/\s*$// for $line;
next if $line =~ m/^#/ || $line !~ m/\S/;
if (
$line =~ m/\A\@([\w\-]+):\z/ || # @Test:
$line =~ m/\A\[([\w\-]+)\]\z/ # [Test]
) {
push @stash, { phase => lc $1, type => $importance, manifest => ( $manifest = [] ) };
}
else {
my ( $package, $version ) = split m/\s+/, $line, 2;
$package = $line unless defined $package;
$version ||= 0;
push @$manifest, ( $package => $version );
}
}
lib/Dist/Dzpl/Parser.pm view on Meta::CPAN
my @author;
if ( ref $input eq 'ARRAY' ) {
@author = @$input;
}
elsif ( $input =~ m/\n/ ) {
for my $line ( split m/\n/, $input ) {
local $_ = $line;
next unless m/\S/;
$line =~ s/^\s*//, s/\s*$//;
push @author, $line;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Iller/DocType.pm view on Meta::CPAN
my $comment_start = $self->comment_start;
my $diff = diff \$previous_document, \$new_document, { STYLE => 'Unified' };
my $diff_count = 0;
my $skip_first = 1;
for my $row (split m{\r?\n}, $diff) {
next if $skip_first-- == 1;
next if $row =~ m{^ };
if($row =~ m{; authordep }) {
++$diff_count;
next;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/AbstractFromPOD.pm view on Meta::CPAN
sub before_build {
my $self = shift;
my $name = $self->zilla->name;
my $class = $name; $class =~ s{ [\-] }{::}gmx;
my $file = $self->zilla->_main_module_override
|| catfile( 'lib', split m{ [\-] }mx, "${name}.pm" );
$file or die 'No main module specified';
-f $file or die "Path ${file} does not exist or not a file";
open my $fh, '<', $file or die "File ${file} cannot open: ${OS_ERROR}";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Acme/CPANLists.pm view on Meta::CPAN
sub before_build {
my $self = shift;
my $name = $self->zilla->name;
my $class = $name; $class =~ s{ [\-] }{::}gmx;
my $filename = $self->zilla->_main_module_override ||
catfile( 'lib', split m{ [\-] }mx, "${name}.pm" );
$filename or die 'No main module specified';
-f $filename or die "Path ${filename} does not exist or not a file";
open my $fh, '<', $filename or die "File ${filename} cannot open: $!";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Acme/CPANModules.pm view on Meta::CPAN
sub before_build {
my $self = shift;
my $name = $self->zilla->name;
my $class = $name; $class =~ s{ [\-] }{::}gmx;
my $filename = $self->zilla->_main_module_override ||
catfile( 'lib', split m{ [\-] }mx, "${name}.pm" );
$filename or die 'No main module specified';
-f $filename or die "Path ${filename} does not exist or not a file";
my $abstract = $self->_get_abstract_from_list_summary($filename);
return unless $abstract;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Bencher/Scenario.pm view on Meta::CPAN
sub before_build {
my $self = shift;
my $name = $self->zilla->name;
my $class = $name; $class =~ s{ [\-] }{::}gmx;
my $filename = $self->zilla->_main_module_override ||
catfile( 'lib', split m{ [\-] }mx, "${name}.pm" );
$filename or die 'No main module specified';
-f $filename or die "Path ${filename} does not exist or not a file";
open my $fh, '<', $filename or die "File ${filename} cannot open: $!";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Data/Sah/Coerce.pm view on Meta::CPAN
sub before_build {
my $self = shift;
my $name = $self->zilla->name;
my $class = $name; $class =~ s{ [\-] }{::}gmx;
my $filename = $self->zilla->_main_module_override ||
catfile( 'lib', split m{ [\-] }mx, "${name}.pm" );
$filename or die 'No main module specified';
-f $filename or die "Path ${filename} does not exist or not a file";
#open my $fh, '<', $filename or die "File ${filename} cannot open: $!";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Data/Sah/Filter.pm view on Meta::CPAN
sub before_build {
my $self = shift;
my $name = $self->zilla->name;
my $class = $name; $class =~ s{ [\-] }{::}gmx;
my $filename = $self->zilla->_main_module_override ||
catfile( 'lib', split m{ [\-] }mx, "${name}.pm" );
$filename or die 'No main module specified';
-f $filename or die "Path ${filename} does not exist or not a file";
#open my $fh, '<', $filename or die "File ${filename} cannot open: $!";
view all matches for this distribution