view release on metacpan or search on metacpan
script/cal-id view on Meta::CPAN
$args{year} = $dt->year;
}
my $res = App::CalId::gen_calendar(%args);
die $res->[1] unless $res->[0] == 200;
say $res->[2];
1;
# ABSTRACT: Display Indonesian calendar on the command-line
# PODNAME: cal-id
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Module/Build.pm view on Meta::CPAN
mkdir(my $fakemoduledir = My::Tests::Below->tempdir() . "/Fake-Module");
my $sample_Build_PL = My::Tests::Below->pod_code_snippet("synopsis");
$sample_Build_PL =~ s/^(.*Acme::Pony.*)$/#$1/m; # As we say in french,
# faut pas _que_ deconner non plus.
my $ordinary_arguments = <<'ORDINARY_ARGUMENTS';
module_name => 'Fake::Module',
license => 'perl',
dist_author => 'Octave Hergebelle <hector@tdlgb.org>',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Caoliu.pm view on Meta::CPAN
# set proxy,if you have installed go-agent or some other proxy softwares
# because the gfw often suck 1024 bbs
$c->proxy('127.0.0.1:8087');
# when in scalar env ,return the count number of downloaded files
say "total downloaded ".scalar($c->reap)." torrent files";
use App::Caoliu::Utils 'dumper';
# when under list env,return the file list
my @reaped = $c->reap;
lib/App/Caoliu.pm view on Meta::CPAN
my $link = 'http://t66y.com/htm_data/2/1309/956691.html';
my $post_href =
$c->parser->parse_post( $c->downloader->ua->get($link)->res->body );
my $file = $c->downloader->download_torrent( $post_href->{rmdown_link},
$c->target, { md5_dir => 0 } );
say "I got the file $file";
# set log
$c->log->path('/tmp/xx.log');
$c->log->level('debug');
lib/App/Caoliu.pm view on Meta::CPAN
=head1 require_md5_path
set this will make the md5 path:
$caoliu->require_md5_path(1);
say $caoliu->require_md5_path;
=head1 proxy
set the caoliu proxy address
$caoliu->proxy('127.0.0.1:8087');
say $caoliu->proxy;
=head1 downloader
set or get the caoliu downloader object:
say $caoliu->downloader;
$caoliu->downloader( App::Caoliu::Downloader->new );
=head1 parser
set or get the caoliu parser object
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ChangeShebang.pm view on Meta::CPAN
exec "$(dirname "$0")"/perl -x "$0" "$@"
#!perl
Why do we need this?
Let's say you build perl with relocatable enabled (C<-Duserelocatableinc>).
Then the shebang lines of executable scripts point at
the installation time perl binary path.
So if you move your perl directory to other places,
the shebang lines of executable scripts point at a wrong perl binary and
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Changelog.pm view on Meta::CPAN
}
sub generate_changelog {
my ($self) = @_;
say "Generating changelog from Git history...";
my $git_log_format =
$self->{compact} ? '--pretty=format:"%h %s"' : '--pretty=fuller';
if ( $self->{conventional} ) {
$git_log_format = '--pretty=format:"%h %s (%an)"';
lib/App/Changelog.pm view on Meta::CPAN
my @tags = $self->_get_tags();
my $changelog_content =
$self->_build_changelog_content( \@tags, $git_log_format );
$self->_write_to_file($changelog_content);
say "Changelog generated successfully in $self->{output_file}.";
}
sub _build_changelog_content {
my ( $self, $tags, $format ) = @_;
my $content = "# Changelog\n\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Changelord/Command/Add.pm view on Meta::CPAN
desc => join ' ', @ARGV,
};
$self->save_changelog;
say "change added to the changelog";
}
'end of App::Changelog::Command::Add';
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CharmKit/Manual/GettingStarted.pod view on Meta::CPAN
pkg [
'nginx-full', 'php-fpm', 'php-cgi', 'php-curl', 'php-gd', 'php-json',
'php-mcrypt', 'php-readline', 'php-mbstring', 'php-xml'
],
ensure => "present",
on_change => sub { say "All latest packages installed."; };
my $hook_path = $ENV{JUJU_CHARM_DIR};
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
devel/closed-form.pl view on Meta::CPAN
while (@bandini < 10) {
push @bandini, compose_weights($sma2, $bandini[-1]);
}
foreach my $aref (@bandini) {
require Data::Dumper;
say Data::Dumper->new([$aref],['B'])->Indent(0)->Dump;
}
say scalar @{$bandini[-1]};
foreach my $aref (@bandini) {
require Data::Dumper;
$aref = [ map {$_*1024} @$aref ];
say Data::Dumper->new([$aref],['B'])->Indent(0)->Dump;
}
exit 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
# Options:
$options
HELP
say _colored( $help );
exit;
}
sub _colored {
Refer to:
perldoc App::Cheats
HELP
say colored($help, "RED");
exit 1;
}
for my $path ( @cheat_files ) {
my $file = basename( $path );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Chit/Command/chat.pm view on Meta::CPAN
my $gpt = App::Chit::Util::chatgpt( $chit );
my $response = $gpt->chat( \@log, $temperature );
$spin->auto_done if $spin;
if ( defined $response ) {
chomp $response;
say $response;
push @{ $chit->{chat} //= [] },
{ role => 'user', content => $prompt },
{ role => 'assistant', content => $response };
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
$::options{appdir} &&= path($::options{appdir})->absolute;
$ENV{DANCER_APPDIR} = $::options{appdir} ||
File::ShareDir::Tarball::dist_dir( 'App-Chorus' );
say "using appdir '$ENV{DANCER_APPDIR}'";
Dancer->import;
Dancer::set( 'port' => $::options{port} );
if ( my $public = $::options{public} ){
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ChromeUtils.pm view on Meta::CPAN
summary => "Check whether Chrome is running",
description => <<'_',
Chrome is defined as running if there are some Chrome processes that are *not*
in 'stop' state. In other words, if Chrome has been started but is currently
paused, we do not say that it's running. If you want to check if Chrome process
exists, you can use `ps_chrome`.
_
args => {
%App::BrowserUtils::args_common,
lib/App/ChromeUtils.pm view on Meta::CPAN
Check whether Chrome is running.
Chrome is defined as running if there are some Chrome processes that are I<not>
in 'stop' state. In other words, if Chrome has been started but is currently
paused, we do not say that it's running. If you want to check if Chrome process
exists, you can use C<ps_chrome>.
This function is not exported.
Arguments ('*' denotes required arguments):
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cmdline.pm view on Meta::CPAN
use parent 'App::Cmd::Simple';
our $VERSION = '0.1.2'; # VERSION
BEGIN {
# we need to say no_auto_version early
use Getopt::Long qw(:config no_auto_version);
}
use Sub::Install;
# ----------------------------------------------------------------
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cme/Command/check.pm view on Meta::CPAN
sub execute {
my ($self, $opt, $args) = @_;
my ($model, $inst, $root) = $self->init_cme($opt,$args);
my $check = $opt->{force_load} ? 'no' : 'yes' ;
say "Loading data..." if $opt->{verbose};
Config::Model::ObjTreeScanner->new(
leaf_cb => sub { },
check => $check,
)->scan_node( undef, $root );
say "Checking data.." if $opt->{verbose};
$root->dump_tree( mode => 'full' ); # light check (value per value)
$root->deep_check; # consistency check
say "Check done." if $opt->{verbose};
my $ouch = $inst->has_warning;
if ( $ouch ) {
my $app = $inst->application;
view all matches for this distribution
view release on metacpan or search on metacpan
script/remove-common-prefix view on Meta::CPAN
sub run {
require String::CommonPrefix;
chomp(my @lines = <>);
my $prefix = String::CommonPrefix::common_prefix(@lines);
for (@lines) { s/\A\Q$prefix\E// }
say for @lines;
}
# MAIN
parse_cmdline();
view all matches for this distribution
view release on metacpan or search on metacpan
script/remove-common-suffix view on Meta::CPAN
sub run {
require String::CommonSuffix;
chomp(my @lines = <>);
my $suffix = String::CommonSuffix::common_suffix(@lines);
for (@lines) { s/\A\Q$suffix\E// }
say for @lines;
}
# MAIN
parse_cmdline();
view all matches for this distribution
view release on metacpan or search on metacpan
script/testcomp view on Meta::CPAN
sub _shell_quote_arg {
require String::ShellQuote;
# pass some strings unquoted: foo=bar is quoted into 'foo=bar' by
# String::ShellQuote; skip quoting it
#say "D:<$_[0]>";
if ($_[0] =~ /\A[A-Za-z0-9_=^-]+\z/) {
return $_[0];
} else {
return String::ShellQuote::shell_quote($_[0]);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ConMenu.pm view on Meta::CPAN
my @menuItems = sort { {$a} cmp {$b} } keys(%$menuItemsUnsorted);
$self->{menuItems} = \@menuItems;
cls();
my $i=1;
my @menuItemsNumerical = map { '['. $i++.'] '.$_ } @menuItems;
say join("\n", @menuItemsNumerical);
say 'Choose a menu item by pressing the corresponding number';
say 'q to exit';
}
sub waitForInput {
my $self = shift;
my $selection = <>;
if ($selection =~ /[0-9]+/){
if ($selection > scalar ($self->{menuItems}) or $selection < 1 ){
say 'Error no such menu item';
exit;
}
} else {
exit;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CrockfordBase32Utils.pm view on Meta::CPAN
my $enc;
if ($gen) {
$enc = $gen->();
} else {
my $num = $from + Math::Random::Secure::irand($to - $from + 1);
#say "from=$from, to=$to, num=$num";
$enc = Encode::Base32::Crockford::base32_encode($num);
}
if ($args{unique} && $seen{$enc}++) {
next;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CryptoCurrencyUtils.pm view on Meta::CPAN
# we capture the records first to speed up otherwise-glacial matching
my @trs;
while ($res->{content} =~ m!(<tr \s id="id-[\w-]+".+?</tr>)!gsx) {
push @trs, $1;
}
#say "D:found ", scalar(@trs), " coins";
my $i = 0;
for my $tr (@trs) {
$i++;
$tr =~
view all matches for this distribution
view release on metacpan or search on metacpan
script/ddflare view on Meta::CPAN
loadConfig($PATH_TO_CONFIG);
=cut
sub loadConfig {
say "Loading config from $CONFIG_FILE" if $VERBOSE;
LoadFile($CONFIG_FILE);
}
# Get cloudflare settings and zone info
my @conf = loadConfig();
script/ddflare view on Meta::CPAN
);
# We are a daemon
while(1) {
$updater->update;
say "Going to sleep for $UPDATE_INTERVAL seconds" if $VERBOSE;
# Don't check too often!
sleep $UPDATE_INTERVAL;
}
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Dest.pm view on Meta::CPAN
what Sqitch does for databases, it provides a simple mechanism for writing
deploy, verify, and revert parts of a change action. The typical use of
C<dest> is in a development context because it allows for simplified state
changes when switching between branches (as an example).
Let's say you're working with a group of other software engineers on a
particular software project using your favorite revision control system.
Let's also say that you have a database that undergoes schema changes as
features are developed, and you have various system activities like the
installation of libraries or other applications. Then let's also say the team
branches, works on stuff, shares those branches, reverts, merges, etc. And also
from time to time you want to go back in time a bit so you can reproduce a bug.
Maintaining the database state and the state of the system across all that
activity can be problematic. C<dest> tries to solve this in a very simple way,
letting you be able to deploy, revert, and verify to any point in time in
lib/App/Dest.pm view on Meta::CPAN
Once a project has been initialized, you need to tell C<dest> what directories
you want to "track". Into these tracked directories you'll place subdirectories
with recognizable names, and into each subdirectory a set of 3 files: deploy,
revert, and verify.
For example, let's say you have a database. So you create C<db> in your
project's root directory. Then call C<dest add db> from your root directory.
Inside C<db>, you might create the directory C<db/schema>. And under that
directory, add the files: deploy, revert, and verify.
The deploy file contains the instructions to create the database schema. The
lib/App/Dest.pm view on Meta::CPAN
dest diff db/schema
dest diff db/schema/deploy
=head2 clean [NAME]
Let's say that for some reason you have a delta between what C<dest> thinks your
system is and what your code says it ought to be, and you really believe your
code is right. You can call C<clean> to tell C<dest> to just assume that what
the code says is right.
You can optionally provide a specific action or even a step of an action to
lib/App/Dest.pm view on Meta::CPAN
dest clean db/schema
dest clean db/schema/deploy
=head2 preinstall [NAME]
Let's say you're setting up a new system or installing the project/application,
so you start by creating yourself a working directory. At some point, you'll
want to deploy all the deploy actions. You'll need to C<init> and C<add> the
directories/paths you need. But C<dest> will have a cache that matches the
current working directory. At this point, you need to C<preinstall> to remove
that cache and be in a state where you can C<update>.
lib/App/Dest.pm view on Meta::CPAN
"deploy" file then deploy the new "deploy" file. (And note that the deployment
will automatically call C<verify>.)
You can optionally add one or more "INCS" strings to the update command to
restrict the update to only perform operations that include one of the "INCS" in
its action file. So for example, let's say you have a "db/changes" directory
with some actions and a "etc/changes" directory with some actions. If you were
to specify "db/changes" as one of your "INCS", this would only update actions
from that directory tree.
Adding a "-d" flag to the command will cause a "dry run" to run, which will
lib/App/Dest.pm view on Meta::CPAN
C<dest> looks for wrapper files up the chain from the location of the action
file. Specifically, it'll assume a file is a wrapper if the filename is
"dest.wrap". If such a file is found, then that file is called, and the name of
the action sub-file is passed as its only argument.
As an example, let's say I created an action set that looked like this
example/
ls/
deploy
revert
verify
Let's then also say that the C<example/ls/deploy> file contains: C<ls>
I could create a deployment file C<example/dest.wrap> that looked like this:
#!/bin/sh
/bin/sh "$1"
lib/App/Dest.pm view on Meta::CPAN
# dest.prereq: db/schema
=head2 Other Developers
Now let's say you invite a friend or coworker to the project. That person might
do something like this:
git clone https://example.com/example_scenario project
cd project
dest init # initiates dest and sets up watches from the watch file
view all matches for this distribution
view release on metacpan or search on metacpan
bin/device-chip-sensor-datalogger view on Meta::CPAN
open $_outh, ">", $_OUTFILE or die "Unable to open $_OUTFILE for writing - $!\n";
$_outh->binmode( ":encoding(UTF-8)" );
$_outh->autoflush;
$_csv->say( $_outh,
[ "# timestamp", map {
my $sensor = $_;
my $chip = $sensor->chip;
my $chipname = ( ref $chip ) =~ s/^Device::Chip:://r;
bin/device-chip-sensor-datalogger view on Meta::CPAN
);
}
method output_readings ( $now, $sensors, $values )
{
$_csv->say( $_outh,
[ strftime( $_TIMESTAMP, localtime $now ), map { $self->_format_reading( $sensors->[$_], $values->[$_] ) } 0 .. $#$sensors ]
);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/dex view on Meta::CPAN
c: 2
: 23
: 42
EOM
my $data = $yppl->load_string($yaml);
say $coder->encode($data);
__END__
{
"complex" : {
"{'{a => 1,c => 2}' => 23}" : 42
}
scripts/dex view on Meta::CPAN
Numbers which also have a C<PV> flag will be recognized as numbers and not
as strings:
my $int = 23;
say "int: $int"; # $int will now also have a PV flag
That means that if you accidentally use a string in numeric context, it will
also be recognized as a number:
my $string = "23";
scripts/dex view on Meta::CPAN
my $code = $yp->load_string(<<'EOM');
--- !perl/code |
{
use 5.010;
my ($name) = @_;
say "Hello $name!";
}
EOM
$code->("Ingy");
=head1 DESCRIPTION
scripts/dex view on Meta::CPAN
the native platform types. For example,
my $x = Math::BigInt->new( "1" x 100 );
my $y = $x + 1;
say for uniqnum( $x, $y );
Will print just the value of C<$x>, believing that C<$y> is a numerically-
equivalent value. This bug does not affect C<uniqstr()>, which will correctly
observe that the two values stringify to different strings.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DistSync.pm view on Meta::CPAN
"# Skip TEMP files",
"!!perl/regexp (?i-xsm:\\.TEMP\\-\\d+\$)",
"\n",
);
if (spew($self->{file_maniskip}, join("\n", @content))) {
say "ok";
} else {
say "fail";
$status = 0;
}
} else {
say "skip";
}
# MANIFEST.DEL
printf "%s... ", $self->{file_manidel};
if (touch($self->{file_manidel}) && (-e $self->{file_manidel}) && -z $self->{file_manidel}) {
lib/App/DistSync.pm view on Meta::CPAN
"# 'spaced dir1/foo.txt' 2y",
"#",
"\n",
);
if (spew($self->{file_manidel}, join("\n", @content))) {
say "ok";
} else {
say "fail";
$status = 0;
}
} else {
say "skip";
}
# MIRRORS
printf "%s... ", $self->{file_mirrors};
if (touch($self->{file_mirrors}) && (-e $self->{file_mirrors}) && -z $self->{file_mirrors}) {
lib/App/DistSync.pm view on Meta::CPAN
"# 'http://www.example.com/dir2' any comment, for example blah-blah-blah",
"#",
"\n",
);
if (spew($self->{file_mirrors}, join("\n", @content))) {
say "ok";
} else {
say "fail";
$status = 0;
}
} else {
say "skip";
}
# README
printf "%s... ", $self->{file_readme};
if (touch($self->{file_readme}) && (-e $self->{file_readme}) && -z $self->{file_readme}) {
lib/App/DistSync.pm view on Meta::CPAN
"# Resource's directory : " . $self->dir,
"#",
"\n",
);
if (spew($self->{file_readme}, join("\n", @content))) {
say "ok";
} else {
say "fail";
$status = 0;
}
} else {
say "skip";
}
return $status;
}
sub sync { # Synchronization. Main proccess
lib/App/DistSync.pm view on Meta::CPAN
my $server = scalar $response->header('Server');
$ret->{code} = $response->code;
$ret->{message} = $response->message;
if ($self->verbose) {
if (!$DEBUG && !$response->is_success) {
say sprintf "> HEAD %s", $uri->as_string;
say sprintf "< %s", $response->status_line;
}
debug("> HEAD %s", $uri->as_string);
debug("< %s", $response->status_line);
if ($response->is_success) {
debug("< Content-Type : %s", $content_type // '');
lib/App/DistSync.pm view on Meta::CPAN
# Request
$response = $ua->mirror($uri, $file);
$ret->{code} = $response->code;;
$ret->{message} = $response->message;
if ($self->verbose) {
debug("> GET %s", $uri->as_string) or say sprintf "> GET %s", $uri->as_string;
debug("< %s", $response->status_line) or say sprintf "< %s", $response->status_line;
}
if ($response->is_success) {
if (-e $file && (-s $file) == $ret->{size}) {
$ret->{status} = 1;
fdelete($temp);
lib/App/DistSync.pm view on Meta::CPAN
# Read MIRRORS file
my $mirrors_mani = maniread($self->{file_mirrors}) // {}; # MIRRORS
my @mirrors = sort {$a cmp $b} keys %$mirrors_mani;
unless (scalar(@mirrors)) {
say STDERR sprintf "File %s is empty", MIRRORS;
return;
}
# Go!
foreach my $url (@mirrors) {
say sprintf "RESOURCE \"%s\"", $url;
my $self_mode = 0;
# Downloading the MANIFEST.LOCK file, skipping the mirror resource if this
# file was successfully downloaded from the resource
{
lib/App/DistSync.pm view on Meta::CPAN
if ($fetch_lock->{status}) { # Ok
if ($self->_check_lockfile($self->{file_manitemp})) {
$self->{url} = $url;
$self_mode = 1;
} else {
say STDERR "Remote resource is in a state of updating. Please wait";
next;
}
}
}
lib/App/DistSync.pm view on Meta::CPAN
my $remote_meta = read_yaml($self->{file_manitemp}) // '';
if (((ref($remote_meta) eq 'ARRAY') || ref($remote_meta) eq 'YAML::Tiny')) {
$remote_meta = $remote_meta->[0] || {};
}
unless ($remote_meta && ref($remote_meta) eq 'HASH') {
say STDERR "Remote resource is unreadable. Please contact the administrator of this resource";
next;
}
unless ($remote_meta->{status}) {
say STDERR "Remote resource is broken. Please contact the administrator of this resource";
next;
}
# Show information
my $remote_url = $remote_meta->{url} || $remote_meta->{uri} || '';
my $remote_date = $meta->{mtime} || 0;
my $remote_datef = $remote_date ? scalar(localtime($remote_date)) : 'UNKNOWN';
my $remote_ok = (time - $remote_date) > _expire(FREEZE) ? 0 : 1;
say sprintf " Resource URL : %s%s", $remote_url, $self_mode ? " (LOCAL RESOURCE)" : '';
say sprintf " Status : %s", $remote_ok ? "OK" : "EXPIRED";
say sprintf " Date : %s", $remote_meta->{date} // 'UNKNOWN';
say sprintf " Modified : %s", $remote_datef;
say sprintf " Hostname : %s", $remote_meta->{hostname} // '';
say sprintf " Directory : %s", $remote_meta->{directory} // '';
say sprintf " Project : %s v%s", $remote_meta->{project} || ref($self), $remote_meta->{version} // '';
say sprintf " Script : %s", $remote_meta->{script} // $Script;
say sprintf " Time : %d sec", $remote_meta->{'time'} || 0;
unless ($remote_ok) {
say STDERR sprintf "NOTE! The resource is expired. Last updated: %s", $remote_datef;
next
}
} else {
printf STDERR "Can't download \"%s\": %s\n", $meta->{url}, $meta->{message};
}
lib/App/DistSync.pm view on Meta::CPAN
return 0;
}
sub _show_summary {
my $self = shift;
my $now = time;
say "SHORT SUMMARY";
printf " Local URL : %s\n", $self->{url} // 'undefined';
printf " Hostname : %s\n", $self->{hostname};
printf " Directory : %s\n", $self->dir;
printf " Insecure mode : %s\n", $self->{insecure} ? 'Yes' : 'No';
printf " Proxy : %s\n", $self->{proxy} || 'none';
view all matches for this distribution
view release on metacpan or search on metacpan
- Support version numbers prefixed with v in release tarball names, since
this appears to be the convention for Perl modules that use semantic
versions.
- Change the docknot.yaml field orphaned to unmaintained, and change the
templates to say the package is not maintained instead of orphaned.
This terminology is more precise and less metaphorical.
- Remove support information from the README.md and README templates for
packages that are no longer maintained, and adjust some of the wording
there and in the thread template.
- Do not wrap paragraphs in output that seem to be a bunch of short
lines, and add support for broken quotes (multiple short lines, such as
poetry) in quotes in the thread template.
- Adjust the README and README.md template to say that make warnings
requires either GCC or Clang, instead of only mentioning GCC.
- Adjust the README.md wording for the list information URL when package
releases are announced on a mailing list.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Dochazka/CLI/Testers.pm view on Meta::CPAN
Finally, we have completed all the administrative setup work necessary for
employees (or their private secretaries) to be able to start entering
attendance data.
Let's say that George spent the whole morning pushing pencils. This can be
entered into the database like so:
$ dochazka-cli -u george -p george
...
Dochazka(2016-02-03) george ACTIVE> interval 8:00-12:00 work Push pencils
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Dochazka/Common.pm view on Meta::CPAN
=head2 Employee
Users of Dochazka are referred to as "employees" regardless of their
legal status -- in reality they might be independent contractors, or
students, or even household pets, but as far as Dochazka is concerned they
are employees. You could say that "employee" is the Dochazka term for "user".
The purpose of the Employee table/object is to store whatever data the site
is accustomed to use to identify its employees.
Within Dochazka itself, employees are distinguished by an internal employee ID
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Dochazka/REST/Guide.pm view on Meta::CPAN
=head2 Employee
Users of Dochazka are referred to as "employees" regardless of their
legal status -- in reality they might be independent contractors, or
students, or even household pets, but as far as Dochazka is concerned they
are employees. You could say that "employee" is the Dochazka term for "user".
The purpose of the Employee table/object is to store whatever data the site
is accustomed to use to identify its employees.
Within Dochazka itself, employees are distinguished by an internal employee ID
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DoubleUp.pm view on Meta::CPAN
STDOUT->autoflush(1);
given ($self->command) {
when ('version') {
say "doubleup version $VERSION";
}
when ('listdb') {
my @db = $self->list_of_schemata();
for (@db) {
say;
lib/App/DoubleUp.pm view on Meta::CPAN
when ('import') {
my @querys = $self->process_files($self->files);
for my $schema (@{ $self->database_names }) {
my $dsn = 'dbi:mysql:'.$schema;
say "DB: $schema";
my $db = $self->connect_to_db($dsn, $self->credentials);
$self->process_querys_for_one_db($db, \@querys);
say '';
}
}
when (undef) {
$self->usage;
}
default {
say "Unknown command: $_";
$self->usage;
}
}
return;
}
sub usage {
my $self = shift;
say "Usage: doubleup [command] [options]";
say "";
say "List of commands";
say "";
say " listdb list of schemata";
say " import [filename] import a file into each db";
say " import1 [db] [filename] import a file into one db";
say " version show version";
say "";
return;
}
1;
view all matches for this distribution