view release on metacpan or search on metacpan
bin/tracker view on Meta::CPAN
hierarchy consisting of the current year and the current month. This
makes it easy (easier..) to find a specific C<tracking file> in case
you need to make some manual corrections (an interface for easier
editing of C<tracking files> is planned).
The filename of a C<tracking file> looks like
'YYYYMMDD-HHMMSS_$project.trc', for example:
F<20110811-090437_App_TimeTracker.trc>.
=head1 CONFIGURATION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TimelogTxt/Tutorial.pod view on Meta::CPAN
you want some form of summarized information. The other reporting commands take
care of that.
=head3 Detail Report
The report I use the most looks like the following:
$ timelog report yesterday
This report shows the data for the given date grouped by project. Although the
actual times are missing and the data is re-ordered, you can get a really good
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Toodledo.pm view on Meta::CPAN
will be called with the object as the first argument and
any C<@args> as the rest.
=head2 $todo->readable( $object, $attribute )
Currently just looks to see if the given C<$attribute> of C<$object>
is a date and if so, returns the C<preferred_date_formst> string
from L<App::Toodledo::Util> instead of the stored epoch second count.
If the date is null, returns an empty string (rather than the Toodledo
display of "no date").
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/VirtualBoxUtils.pm view on Meta::CPAN
};
our $default_filter = sub {
my $p = shift;
do { $p->{_note} = "fname looks like VirtualBox"; goto FOUND } if $p->{fname} =~ /\A(VirtualBoxVM|VirtualBox|VBoxSVC)\z/;
goto NOT_FOUND;
FOUND:
log_trace "Found VirtualBox process (PID=%d, cmdline=%s, note=%s)", $p->{pid}, $p->{cmndline}, $p->{_note};
return 1;
NOT_FOUND:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/WRT/Markup.pm view on Meta::CPAN
Inline replace <textile> markup in a string.
=cut
# This is exactly the kind of code that, even though it isn't doing anything
# especially over the top, looks ghastly to people who don't read Perl, so I'll
# try to explain a bit.
sub textile_process {
# First, there's a state variable here which can retain the Text::Textile
view all matches for this distribution
view release on metacpan or search on metacpan
t/whatsit.t view on Meta::CPAN
Version: $tm_v
Path: $tm_p
};
my $result = test_app(App::Whatsit => ['Test::More']);
is($result->stdout, $tm_res, 'Test::More version looks right');
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
script/wp-tools view on Meta::CPAN
}
open my $db_test, '<', $db_file;
my $first_line = <$db_test>;
close $db_test;
if ($first_line =~ /Usage: mysqldump/) {
die "Database dump looks like it failed because it contains usage (command: $dump_command)";
}
}
}
### backup filesystem
view all matches for this distribution
view release on metacpan or search on metacpan
t/autofix.t view on Meta::CPAN
my $wf = { jobs => { build => {} } };
my @out = $rule->check($wf, { file => 'test.yml' });
is scalar(@out), 1, 'one diagnostic returned';
like $out[0]{message}, qr/missing timeout/, 'message looks right';
done_testing;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/YoutubeDlIf.pm view on Meta::CPAN
my @argv_for_youtube_dl;
ARG:
for my $arg (@{$args{urls_or_ids}}) {
FILTER: {
# looks like an option name
last FILTER if $arg =~ /\A--?\w+/ && $arg !~ $re_video_id;
my $video_id = YouTube::Util::extract_youtube_video_id($arg);
if ($video_id) {
log_trace "Argument %s has video ID %s", $arg, $video_id;
view all matches for this distribution
view release on metacpan or search on metacpan
You can chain together adding and showing, eg
$ zapzi add show README.md
will add a copy of README.md to the database and then open a browser
to show how it looks in readable format.
# Configuration
To view or change configuration variables use the `config get` or
`config set` commands, eg:
view all matches for this distribution
view release on metacpan or search on metacpan
script/_chinese-zodiac-of view on Meta::CPAN
#
#=head2 COMPLETE_BASH_SUMMARY_ALIGN
#
#String. Either C<left> (the default) or C<right>.
#
#The C<left> align looks something like this:
#
# --bar Summary about the bar option
# --baz Summary about the baz option
# --foo Summary about the foo option
# --schapen Summary about the schapen option
script/_chinese-zodiac-of view on Meta::CPAN
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#our @EXPORT_OK = qw(dd_ellipsis dmp_ellipsis);
script/_chinese-zodiac-of view on Meta::CPAN
#
# my $ref = ref($val);
# if ($ref eq '') {
# if (!defined($val)) {
# return "undef";
# } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
# # perl does several normalizations to number literal, e.g.
# # "+1" becomes 1, 0123 is octal literal, etc. make sure we
# # only leave out quote when the number is not normalized
# $val eq $val+0 &&
# # perl also doesn't recognize Inf and NaN as numeric
script/_chinese-zodiac-of view on Meta::CPAN
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
script/_chinese-zodiac-of view on Meta::CPAN
#
## Check whether or not a scalar should be emitted as an plain scalar.
#sub is_valid_plain {
# my $self = shift;
# return 0 unless length $_[0];
# return 0 if $self->quote_numeric_strings and Scalar::Util::looks_like_number($_[0]);
# # refer to YAML::Old::Loader::parse_inline_simple()
# return 0 if $_[0] =~ /^[\s\{\[\~\`\'\"\!\@\#\>\|\%\&\?\*\^]/;
# return 0 if $_[0] =~ /[\{\[\]\},]/;
# return 0 if $_[0] =~ /[:\-\?]\s/;
# return 0 if $_[0] =~ /\s#/;
script/_chinese-zodiac-of view on Meta::CPAN
# }
# else {
# $self->die('YAML_LOAD_ERR_BAD_SEQ_ELEMENT');
# }
#
# # Check whether the preface looks like a YAML mapping ("key: value").
# # This is complicated because it has to account for the possibility
# # that a key is a quoted string, which itself may contain escaped
# # quotes.
# my $preface = $self->preface;
# if ( $preface =~ /^ (\s*) ( \w .*? \: (?:\ |$).*) $/x or
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ZofCMS/Config.pm view on Meta::CPAN
as is described in section B<Note on page and dir query parameters>
above.
B<Note:> when specifying the "directory keys", make sure to have the leading
and ending slash (or just one slash if it's a "root" directory),
because that's what the C<dir> query parameter looks like after being
processed.
=head2 C<zcms_template_extension>
{ zcms_template_extension => '.tmpl', }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/a2p.pm view on Meta::CPAN
nonexistent array elements spring into existence simply by being
referenced. If somehow you are relying on this mechanism to create
null entries for a subsequent for...in, they won't be there in perl.
If a2p makes a split line that assigns to a list of variables that
looks like (Fld1, Fld2, Fld3...) you may want to rerun a2p using the
B<-n> option mentioned above. This will let you name the fields
throughout the script. If it splits to an array instead, the script
is probably referring to the number of fields somewhere.
The exit statement in awk doesn't necessarily exit; it goes to the END
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-module.t view on Meta::CPAN
# Test 1: Module loads
use_ok('App::aep');
# Test 2: Module version is set
ok( defined $App::aep::VERSION, 'VERSION is defined' );
like( $App::aep::VERSION, qr/^\d+\.\d+$/, 'VERSION looks like a version number' );
# Test 3: Constructor works
my $obj = App::aep->new( { '_passed_args' => {} } );
isa_ok( $obj, 'App::aep' );
view all matches for this distribution
view release on metacpan or search on metacpan
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
view all matches for this distribution
view release on metacpan or search on metacpan
Number of arguments are calculated from the number of `%` characters
in the format string except `%%`. Variable width and precision
parameter `*` can be used like `%*s` or `%*.*s`.
Format string also can be made by **-f** option. Next commands produce
same output, but second one looks better.
ansiecho -f -f '%%%ds' 16 hello
ansiecho -f '%*s' 16 hello
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/assh.pm view on Meta::CPAN
assh
assh HOSTNAME
=head1 REQUIREMENTS
First, you will need a file `~E<sol>.sshE<sol>config`. It looks something like this:
Host foo
HostName bar.example.com
User baz
view all matches for this distribution
view release on metacpan or search on metacpan
# obnoxious and useless test noise, something's fucky with this cat's
# smokers; f.ex:
# http://www.cpantesters.org/cpan/report/82c71a7e-e6a9-11e5-8839-f3218d218ed8
require Test::More;
Test::More::plan(skip_all =>
"this looks like one of Nigel Horne's busted smokers"
)
}
}
use Test::Cmd;
diag "Found SHA support";
$cmd->run(args => '-m sha256', stdin => 'foo');
is $? >> 8, 0, 'bmkpasswd (-m sha256) exit 0';
my $crypt = $cmd->stdout;
chomp $crypt;
ok index($crypt, '$5$') == 0, 'sha256 hash looks ok';
$cmd->run(args => "-c @{[quotemeta $crypt]} foo");
cmp_ok $cmd->stdout, 'eq', "Match\n$crypt\n",
'bmkpasswd -c (sha256) returned hash';
}
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/boxmuller view on Meta::CPAN
#!/usr/bin/perl
use 5.014 ; use strict ; use warnings ; # the functions requires 5.10 for "state", 5.14 for srand.
use Getopt::Std ; getopts ':.:@:1d:g:Lm:s:v:', \my%o ;
use Math::Trig qw/pi/ ; # 5.4ãã
use Scalar::Util qw/looks_like_number/ ; # 5.7.3ãã
use Term::ANSIColor qw/:constants color/ ; $Term::ANSIColor::AUTORESET = 1 ;
use Time::HiRes qw/sleep usleep gettimeofday tv_interval/ ; # 5.7.3ãã
$SIG{INT} = sub { & SecondInfo ; exit 130 } ;
scripts/boxmuller view on Meta::CPAN
exit 0 ;
sub init ( ) { #ãªãã·ã§ã³ã使ã£ãè¨å®
$o{s} = defined $o{s} ? srand $o{s} : srand ; # ä¹±æ°ã·ã¼ãã®ä¿ç®¡/è¨å®
sub LLN ( $ ) ; * LLN = * looks_like_number ; # 颿°åãé·ãããã®ã§ãçãããã
sub printErr( $ ){ print STDERR BRIGHT_RED "Option -$_[0] should have a numeric specification.\n" ; exit 1 }
$mu = $o{m} ? LLN $o{m} ? $o{m} : printErr "m" : 0 ; #m : å¹³å
$sd = $o{d} ? LLN $o{d} ? $o{d} : printErr "d" : $o{v} ? LLN $o{v} ? sqrt $o{v} : printErr "v" : 1 ; #sdï¼æ¨æºåå·®
}
view all matches for this distribution
view release on metacpan or search on metacpan
and --not-match-d to include the file's path
in the regex, not just the file's basename.
(This does not expand each file to include its
absolute path, instead it uses as much of
the path as is passed in to cloc.)
Note: --match-d always looks at the full
path and therefore is unaffected by --fullpath.
--include-lang=<L1>[,L2,] Count only the given comma separated languages
L1, L2, L3, et cetera.
--match-d=<regex> Only count files in directories matching the Perl
regex. For example
return unless %git_hash;
my $have_tar_git = external_utility_exists($ON_WINDOWS ? "unzip" : "tar --version") &&
external_utility_exists("git --version");
if (!$have_tar_git) {
warn "One or more inputs looks like a git hash but " .
"either git or tar is unavailable.\n";
return;
}
my %repo_listing = (); # $repo_listing{hash}{files} = 1;
if ($ON_WINDOWS) {
$F_norm = lc $F_norm; # for case insensitive file name comparisons
$F_norm =~ s{\\}{/}g; # Windows directory separators to Unix
$F_norm =~ s{^\./}{}g; # remove leading ./
if (($F_norm !~ m{^/}) and ($F_norm !~ m{^\w:/})) {
# looks like a relative path; prefix with cwd
$F_norm = lc "$cwd/$F_norm";
}
} else {
$F_norm =~ s{^\./}{}g; # remove leading ./
if ($F_norm !~ m{^/}) {
# looks like a relative path; prefix with cwd
$F_norm = lc "$cwd/$F_norm";
}
}
# Remove trailing / so it does not interfere with further regex code
# that does not expect it
# Note that /usr/src/redhat/BUILD/ucd-snmp-4.1.1/ov/bitmaps/UCD.20.p
# is actually C code. The heuristics determine that they're not Pascal,
# but because it ends in ".p" it's not counted as C code either.
# I believe this is actually correct behavior, because frankly it
# looks like it's automatically generated (it's a bitmap expressed as code).
# Rather than guess otherwise, we don't include it in a list of
# source files. Let's face it, someone who creates C files ending in ".p"
# and expects them to be counted by default as C files in SLOCCount needs
# their head examined. I suggest examining their head
# with a sucker rod (see syslogd(8) for more on sucker rods).
view all matches for this distribution
view release on metacpan or search on metacpan
use Encode qw[ decode_utf8 encode_utf8 ] ;
use FindBin qw [ $Script ] ;
use Getopt::Std ; getopts 'R:c:g:i:jm:r:su:v:z=!@:#:0:2:' => \my %o ;
use List::Util qw/max min maxstr minstr/ ;
use POSIX qw/strtod/ ; # # å¹³åå¤ã®è¨ç®ã«ç¨ãã str to double.
use Scalar::Util qw/looks_like_number/;
use Term::ANSIColor qw/:constants color/ ; $Term::ANSIColor::AUTORESET = 1 ;
use Time::HiRes qw [ gettimeofday tv_interval ] ; my ${ dt_start } = [ gettimeofday ] ;
my $sdt = sprintf '%04d-%02d-%02d %02d:%02d:%02d', do{my @t= @{[localtime]}[5,4,3,2,1,0]; $t[0]+=1900; $t[1]++; @t } ;
eval "use PerlIO::gzip;1" or die "PerlIO::gzip cannot be loaded, so -z does not work. ($Script, $sdt)\n" if $o{z} ;
# é
ååç
§ãããæå°å¤æå¤§å¤ãåãåºã
sub minmaxstr ( $ ) {
* uniq = sub (@) {my %hh ;map { $hh{$_}++ != 0 ? () : $_ } @_ } ;
sub part ( &@ ) ;
sub RangeStr ( $$ ) ;
my @gps = part {/^0*$/ ? 0 : looks_like_number $_ ? 1 : 2} @{ $_[0] } ;
my @ostr ;
push @ostr, join $o{r}, sort & uniq ( @{$gps[0]} ) if $gps[0] ; # 空æååãããã¨ãã®å¦ç
push @ostr, RangeStr( min(@{$gps[1]}), max(@{$gps[1]}) ) if $gps[1] ; # æ°ã«è¦ããå¤ãããã¨ãã®å¦ç
push @ostr, RangeStr( minstr(@{$gps[2]}), maxstr(@{$gps[2]}) ) if $gps[2] ; # æ°ã«è¦ããªãå¤ãããã¨ãã®å¦ç
return @ostr;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution