view release on metacpan or search on metacpan
inc/MyMakeMakerGettext.pm view on Meta::CPAN
# message translation stuff -- from MyMakeMakerGettext
PO_DOMAIN = $po_domain
POT_COPYRIGHT_HOLDER = $pot_copyright_holder
POT_FILE = po/\$(PO_DOMAIN).pot
POT_INPUTS = $pot_inputs
PO_FILES = $po_files
MO_FILES = $mo_files
HERE
$ret .= <<'HERE';
inc/MyMakeMakerGettext.pm view on Meta::CPAN
# "--keyword" options needed for 0.17, maybe they'll be builtin in later
# gettext.
#
POT_TEMP_FILE = $(PO_DOMAIN)-messages.tmp
$(POT_FILE): po/header.pot $(POT_INPUTS)
xgettext \
--omit-header \
--add-comments=TRANSLATORS: \
--width=78 \
--msgid-bugs-address='$(AUTHOR)' \
inc/MyMakeMakerGettext.pm view on Meta::CPAN
--keyword=__x \
--keyword=N__ \
--keyword=__nx:1,2 \
--keyword=__p:1c,2 \
--keyword=__px:1c,2 \
$(POT_INPUTS)
cat po/header.pot $(POT_TEMP_FILE) >$(POT_FILE)
rm $(POT_TEMP_FILE)
# Each po/XX.po is msgmerged from the .pot, and generates a .mo under
# LocaleData.
view all matches for this distribution
view release on metacpan or search on metacpan
# Print a message in cmake
message( "PROJECT_NAME: ${PROJECT_NAME}" )
# Assign variable in cmake
set(GENERATE_OUTPUT_DIR "${CMAKE_BINARY_DIR}/src_generated/")
# Remove files from a folder using cmake
file(GLOB REMOVE_FILES "${CMAKE_BINARY_DIR}/*")
message("REMOVE_FILES: ${REMOVE_FILES}")
file(REMOVE_RECURSE ${REMOVE_FILES})
# filename âââ refers to STDIN. When
# opened for writing, the same special
# filename refers to STDOUT.
# Normally, these are specified as â<ââ and â>ââ,
# respectively.
open(INPUT, "â" ) || die; # reâopen standard input for reading
open(INPUT, "<â") || die; # same thing, but explicit
open(OUTPUT, ">â") || die; # reâopen standard output for writing
# Can always use / for files in perl (even on DOS).
my $path = "a\b\c.txt";
my $path = "a/b/c.txt";
# Run a child in a separate process and wait for it.
perl -E 'my $PID = fork; if (!$PID){ sleep 2; say "child"; exit 0 } waitpid $PID, 0; say "parent"'
# Send data from forked child back to parent using pipes.
perl -E 'pipe(INPUT,OUTPUT); my $PID = fork; if (!$PID){ close INPUT; sleep 1; say "child"; say OUTPUT "42"; close OUTPUT; exit 0 } close OUTPUT; waitpid $PID, 0; say "parent"; my ($Data) = <INPUT>; say "[$Data]"'
# Run multiple processes and collect their data.
perl -MMojo::Util=dumper -E 'use strict; use warnings; local $| = 1; my @Wait; for my $Count (1..5){ my($In,$Out); pipe($In,$Out); my $PID = fork; if (!$PID){ close $In; sleep int(rand(5)); say "Running child $Count"; say $Out "From-$Count"; close $O...
Running child 2
Running child 3
view all matches for this distribution
view release on metacpan or search on metacpan
script/remove-common-prefix view on Meta::CPAN
exit 0;
},
'help|h' => sub {
print <<TEXT;
Usage:
strip-common-prefix [OPTIONS]... [INPUT [OUTPUT]]
strip-common-prefix --version, -v
strip-common-prefix --help, -h
Options:
For more details, see the manpage/documentation.
script/remove-common-prefix view on Meta::CPAN
This document describes version 0.001 of remove-common-prefix (from Perl distribution App-CommonPrefixUtils), released on 2024-05-16.
=head1 SYNOPSIS
strip-common-prefix [OPTION]... [INPUT]
Sample input:
foobar
foobaz
view all matches for this distribution
view release on metacpan or search on metacpan
script/remove-common-suffix view on Meta::CPAN
exit 0;
},
'help|h' => sub {
print <<TEXT;
Usage:
strip-common-suffix [OPTIONS]... [INPUT [OUTPUT]]
strip-common-suffix --version, -v
strip-common-suffix --help, -h
Options:
For more details, see the manpage/documentation.
script/remove-common-suffix view on Meta::CPAN
This document describes version 0.001 of remove-common-suffix (from Perl distribution App-CommonSuffixUtils), released on 2024-05-16.
=head1 SYNOPSIS
strip-common-suffix [OPTION]... [INPUT]
Sample input:
1foo
23foo
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Context/POE/Server.pm view on Meta::CPAN
### THIS DOESN'T WORK YET, THROWS AN EXCEPTION
sub _state_q {
my $self = @_;
my $HOTEL_SITE_QNAME = "q-hotel_site";
my $HOTEL_COMPUTE_QNAME = "q-hotel_compute";
my $state = "";
for my $qname ("q-hotel_site", "q-hotel_compute") {
$state .= "$qname\n";
### EXCEPTION IS THROWN HERE
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cpanx.pm view on Meta::CPAN
This script has no dependencies. It uses the curl program to download.
This script is self contained. It's runnable if all you have is the one file.
=head1 EXAMPLE OUTPUT
jacob@prism ~ $ cpanx Acme::MetaSyntactic
curl http://www.cpan.org/modules/02packages.details.txt.gz -z /Users/jacob/.cpanx/02packages.details.txt.gz -R
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
view all matches for this distribution
view release on metacpan or search on metacpan
bin/db-browser view on Meta::CPAN
Some C<read-line>s have predefined values. You can access these values with the C<Up-Arrow> and C<Down-Arrow> keys.
To exit a C<read-line> without returning anything, press C<Ctrl-X>. When the input buffer is empty and C<Enter> is
pressed, C<read-line> returns an empty string.
=head1 OUTPUT
The elements are right-justified if they look like a number; otherwise, they are left-justified.
If the option I<squash_spaces> is enabled, leading and trailing spaces are removed from the elements, and spaces are
squashed to a single white space.
view all matches for this distribution
view release on metacpan or search on metacpan
use App::DTWMIC;
use Udev::FFI;
use YAML::Syck;
use constant {
DEVICE_INPUT_OTHER => 0,
DEVICE_INPUT_MOUSE => 1,
DEVICE_INPUT_TOUCHPAD => 2,
DEVICE_INPUT_TABLET => 3,
DEVICE_INPUT_TOUCHSCREEN => 4,
SYNCLIENT_LOCATIONS => [
'/usr/bin/synclient'
]
};
my $udev;
sub _get_device_type {
my $device = shift;
my $id_input_mouse = $device->get_property_value('ID_INPUT_MOUSE');
my $id_input_touchpad = $device->get_property_value('ID_INPUT_TOUCHPAD');
my $id_input_tablet = $device->get_property_value('ID_INPUT_TABLET');
my $id_input_touchscreen = $device->get_property_value('ID_INPUT_TOUCHSCREEN');
if (defined($id_input_mouse) && $id_input_mouse eq '1') {
# ID_INPUT_MOUSE: Touchscreens and tablets have this flag as well, since by the type of events they can produce
# they act as a mouse.
# https://askubuntu.com/questions/520359/how-to-detect-touchscreen-devices-from-a-script
if (defined($id_input_touchpad) && $id_input_touchpad eq '1') {
return DEVICE_INPUT_TOUCHPAD;
}
elsif (defined($id_input_tablet) && $id_input_tablet eq '1') {
return DEVICE_INPUT_TABLET;
}
elsif (defined($id_input_touchscreen) && $id_input_touchscreen eq '1') {
return DEVICE_INPUT_TOUCHSCREEN;
}
return DEVICE_INPUT_MOUSE;
}
elsif (defined($id_input_touchpad) && $id_input_touchpad eq '1') {
return DEVICE_INPUT_TOUCHPAD;
}
elsif (defined($id_input_tablet) && $id_input_tablet eq '1') {
return DEVICE_INPUT_TABLET;
}
elsif (defined($id_input_touchscreen) && $id_input_touchscreen eq '1') {
return DEVICE_INPUT_TOUCHSCREEN;
}
return DEVICE_INPUT_OTHER;
}
sub _get_device_data {
my $device = shift;
if (defined(my $device = $udev->new_device_from_syspath($_))) {
my $device_data = _get_device_data($device);
next
unless %$device_data;
if (DEVICE_INPUT_TOUCHPAD == $device_data->{'type'}) {
$touchpads->{ $device_data->{'sysname'} } = $device_data->{'data'};
}
elsif (DEVICE_INPUT_MOUSE == $device_data->{'type'}) {
++$has_mouse_devices;
}
}
}
}
}
$max_str_length += 8 - ($max_str_length % 4);
for my $dev_type (@{ [[DEVICE_INPUT_MOUSE, 'MOUSE DEVICES'], [DEVICE_INPUT_TOUCHPAD, 'TOUCHPAD DEVICES']] }) {
print("$dev_type->[1]:\n");
while (my ($sysname, $device_data) = each(%{ $input_devices->{ $dev_type->[0] } })) {
print(' '.$device_data->{'name'}.(' ' x ($max_str_length - length($device_data->{'name'}))).
"sysname: $sysname\n");
view all matches for this distribution
view release on metacpan or search on metacpan
To make it easy to publish to Amazon S3, one option is to create a Makefile
that encodes the publishing instructions. Here is a Makefile that I use for
[Mark Benson Portfolio](http://markbenson.io/):
BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/_source
OUTPUTDIR=$(BASEDIR)/_output
S3_BUCKET=markbenson.io
build:
dapper build
serve: build
dapper serve
publish: build
s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --reduced-redundancy --acl-public --delete-removed
watch:
dapper watch
.PHONY: build serve publish watch
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DocKnot/Generate.pm view on Meta::CPAN
use Path::Tiny qw(path);
use Template;
use Text::Wrap qw(wrap);
# Default output files for specific templates.
my %DEFAULT_OUTPUT = (
'readme' => 'README',
'readme-md' => 'README.md',
);
##############################################################################
lib/App/DocKnot/Generate.pm view on Meta::CPAN
# Throws: autodie exception on failure to read metadata or write the output
# Text exception on Template Toolkit failures
# Text exception on inconsistencies in the package data
sub generate_all {
my ($self) = @_;
for my $template (keys(%DEFAULT_OUTPUT)) {
$self->generate_output($template);
}
return;
}
lib/App/DocKnot/Generate.pm view on Meta::CPAN
# Throws: autodie exception on failure to read metadata or write the output
# Text exception on Template Toolkit failures
# Text exception on inconsistencies in the package data
sub generate_output {
my ($self, $template, $output) = @_;
$output //= $DEFAULT_OUTPUT{$template};
# If the template doesn't have a default output file, $output is required.
if (!defined($output)) {
croak('missing required output argument');
}
lib/App/DocKnot/Generate.pm view on Meta::CPAN
Generate all of the documentation files for a package. This is currently
defined as the C<readme> and C<readme-md> templates. The output will be
written to the default output locations, as described under generate_output().
=item generate_output(TEMPLATE [, OUTPUT])
The same as generate() except that rather than returning the generated
documentation file as a string, it will be written to the file named by
OUTPUT. If that argument isn't given, a default based on the TEMPLATE
argument is chosen as follows:
readme -> README
readme-md -> README.md
If TEMPLATE isn't one of the templates listed above, the OUTPUT argument is
required.
=back
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
config/CLI_Config.pm view on Meta::CPAN
set( 'DOCHAZKA_REST_LOGIN_NICK', undef );
# DOCHAZKA_REST_LOGIN_NICK
# password to use when we authenticate ourselves to the App::Dochazka::REST server
# when this is set to '' or undef, App::Dochazka::CLI will prompt for a password
# WARNING: PUTTING YOUR PASSWORD HERE MAY BE CONVENIENT, BUT IS PROBABLY UNSAFE
set( 'DOCHAZKA_REST_LOGIN_PASSWORD', undef );
# MREST_CLI_COOKIE_JAR
# default location of the cookie jar
set( 'MREST_CLI_COOKIE_JAR', "$ENV{HOME}/.cookies.txt" );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
$self->context->{'stash'}->{'param_value'} = $param_obj->get( $param ) if $bool;
return $bool;
}
# second pass
if ( $type ne 'meta' and $method =~ m/^(PUT)|(DELETE)$/ ) {
$self->mrest_declare_status( code => 400, explanation =>
'PUT and DELETE can be used with meta parameters only' );
return $fail;
}
if ( $method eq 'GET' ) {
return $CELL->status_ok( 'MREST_PARAMETER_VALUE', payload => {
$param => $self->context->{'stash'}->{'param_value'},
} );
} elsif ( $method eq 'PUT' ) {
$log->debug( "Request entity: " . Dumper( $self->context->{'request_entity'} ) );
return $param_obj->set( $param, $self->context->{'request_entity'} );
} elsif ( $method eq 'DELETE' ) {
delete $param_obj->{$param};
return $CELL->status_ok( 'MREST_PARAMETER_DELETED', payload => {
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
# second pass
if ( $context->{'method'} eq 'GET' ) {
return $CELL->status_ok( 'DISPATCH_ACTIVITY_FOUND',
payload => $context->{'stashed_activity_object'}
);
} elsif ( $context->{'method'} eq 'PUT' ) {
return shared_update_activity(
$self,
$context->{'stashed_activity_object'},
$context->{'request_entity'}
);
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
}
=head3 handler_put_activity_code
Handler for the 'PUT activity/code/:code' resource.
=cut
sub handler_put_activity_code {
my ( $self, $pass ) = @_;
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
# second pass
if ( $context->{'method'} eq 'GET' ) {
return $CELL->status_ok( 'DISPATCH_COMPONENT_FOUND',
payload => $context->{'stashed_component_object'}
);
} elsif ( $context->{'method'} eq 'PUT' ) {
return shared_update_component(
$self,
$context->{'stashed_component_object'},
$context->{'request_entity'}
);
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
}
=head3 handler_put_employee_eid
Handler for 'PUT employee/eid/:eid' - can only be update.
=cut
sub handler_put_employee_eid {
my ( $self, $pass ) = @_;
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
}
=head3 handler_put_employee_nick
Handler for 'PUT employee/nick/:nick' - a little complicated because it can
be insert or update, depending on whether or not the employee exists.
=cut
sub handler_put_employee_nick {
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
return 1;
}
# second pass
my $func = $context->{'put_employee_func'};
$log->debug( "PUT employee function is $func - " );
if ( $func eq 'update_employee' ) {
return $fail unless shared_employee_acl_part2( $self );
} elsif ( $func eq 'insert_employee' ) {
$context->{'request_entity'}->{'nick'} = $context->{'mapping'}->{'nick'};
} else {
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
}
=head3 handler_put_employee_ldap
Handler for 'PUT employee/nick/:nick/ldap' resource.
=cut
sub handler_put_employee_ldap {
my ( $self, $pass ) = @_;
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
}
# second pass
my $int = $context->{'stashed_interval_object'};
my $method = $context->{'method'};
if ( $method =~ m/^(PUT)|(POST)$/ ) {
return shared_update_intlock( $self, $int, $context->{'request_entity'} );
} elsif ( $method eq 'DELETE' ) {
return $int->delete( $context );
}
die "AAGAGAGGGGGGGGGGHHGHGHKD! method is " . ( $method || "undef" );
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
}
# second pass
my $lock = $context->{'stashed_lock_object'};
my $method = $context->{'method'};
if ( $method =~ m/^(PUT)|(POST)$/ ) {
return shared_update_intlock( $self, $lock, $context->{'request_entity'} );
} elsif ( $method eq 'DELETE' ) {
return $lock->delete( $context );
}
die "AAGAGAGGGGGGGGGGHHGHGHKD! method is " . ( $method || "undef" );
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
}
=head3 handler_put_schedule_sid
Handler for 'PUT schedule/sid/:sid'
=cut
sub handler_put_schedule_sid {
my ( $self, $pass ) = @_;
lib/App/Dochazka/REST/Dispatch.pm view on Meta::CPAN
}
=head3 handler_put_schedule_scode
Handler for 'PUT schedule/scode/:scode'
=cut
sub handler_put_schedule_scode {
my ( $self, $pass ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
0.123 2014-10-14 11:21 CEST
- js/: refine privHistory dnotice
0.124 2014-10-16 15:42 CEST
- js/emp-lib.js: fix "Edit employee profile" functionality (was using PUT
on 'employee/eid' resource, which is no longer supported by the server)
0.125 2015-07-22 09:59 CEST
- update copyright statement to 2015
- migrate repo to Github
- ldapLookup: always display AJAX error
- Improve AJAX error reporting
- Dispatch.pm: revamp/simplify session management
- Rip out entry definitions for deprecated newEmployee target
- Plumb in an empObject prototype distinct from empProfile
- js: make ldapLookupSubmit GET instead of PUT
- dispatch: tweak debug log messages
- js: lower ACL profile of ldapLookupSubmit and privHistory targets
- Revamp LDAP lookup feature (GET first)
- js: handle empty nick in ldapLookupSubmit
- Add "Sync" option to LDAP lookup result miniMenu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Du/Analyze.pm view on Meta::CPAN
}
my $in_fh;
my $filename;
if ( !defined( $filename = $ENV{ANALYZE_DU_INPUT_FN} ) )
{
$filename = shift(@argv);
}
if ( !defined($filename) )
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ElasticSearch/Utilities.pm view on Meta::CPAN
if(!is_hashref($settings)) {
output({stderr=>1,color=>'red'}, 'usage is es_apply_index_settings($index,$settings_hashref)');
return;
}
return es_request('_settings',{ method => 'PUT', index => $index },$settings);
}
sub es_index_segments {
my ($index) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/EvalServer.pm view on Meta::CPAN
=head1 DESCRIPTION
This application evaluates arbitrary source code in a safe enviroment. It
listens on a TCP port and accepts JSON data desribing a language and some
code to evaluate. The result of the evaluation and some accompanying
information is then returned as back as JSON data. See L</INPUT> and
L</OUTPUT> for details.
=head1 METHODS
=head2 C<new>
lib/App/EvalServer.pm view on Meta::CPAN
=head2 C<shutdown>
Shuts down the server. Takes no arguments.
=head1 INPUT
To request an evaluation, you need to send a JSON hash containing the
following keys:
B<'lang'>, a string containing the language module suffix, e.g. 'Perl' for
L<App::EvalServer::Language::Perl|App::EvalServer::Language::Perl>.
B<'code'>, a string containing the code you want evaluated.
=head1 OUTPUT
When your request has been processed, you will receive a JSON hash back. If
no errors occurred B<before> the code was evaluated, the hash will contain the
following keys:
view all matches for this distribution
view release on metacpan or search on metacpan
share/status/app/lib/angular/angular-resource.js view on Meta::CPAN
*
* Where:
*
* - **`action`** â {string} â The name of action. This name becomes the name of the method on
* your resource object.
* - **`method`** â {string} â HTTP request method. Valid methods are: `GET`, `POST`, `PUT`,
* `DELETE`, and `JSONP`.
* - **`params`** â {Object=} â Optional set of pre-bound parameters for this action. If any of
* the parameter value is a function, it will be executed every time when a param value needs to
* be obtained for a request (unless the param was overridden).
* - **`url`** â {string} â action specific `url` override. The url templating is supported just
share/status/app/lib/angular/angular-resource.js view on Meta::CPAN
//putResponseHeaders => $http header getter
});
});
</pre>
* # Creating a custom 'PUT' request
* In this example we create a custom method on our resource to make a PUT request
* <pre>
* var app = angular.module('app', ['ngResource', 'ngRoute']);
*
* // Some APIs expect a PUT request in the format URL/object/ID
* // Here we are creating an 'update' method
* app.factory('Notes', ['$resource', function($resource) {
* return $resource('/notes/:id', null,
* {
* 'update': { method:'PUT' }
* });
* }]);
*
* // In our controller we get the ID from the URL using ngRoute and $routeParams
* // We pass in $routeParams and our Notes factory along with $scope
share/status/app/lib/angular/angular-resource.js view on Meta::CPAN
* $id = note.id;
*
* // Now call update passing in the ID first then the object you are updating
* Notes.update({ id:$id }, note);
*
* // This will PUT /notes/ID with the note object in the request payload
* }]);
* </pre>
*/
angular.module('ngResource', ['ng']).
factory('$resource', ['$http', '$q', function($http, $q) {
share/status/app/lib/angular/angular-resource.js view on Meta::CPAN
function Resource(value){
shallowClearAndCopy(value || {}, this);
}
forEach(actions, function(action, name) {
var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);
Resource[name] = function(a1, a2, a3, a4) {
var params = {}, data, success, error;
/* jshint -W086 */ /* (purposefully fall through case statements) */
view all matches for this distribution
view release on metacpan or search on metacpan
script/fatpack-simple view on Meta::CPAN
=head1 OPTIONS
-d, --dir DIRECTORIES where pm files to be fatpacked are.
default: lib,fatlib,local,extlib
-o, --output OUTPUT output filename
-e, --exclude MODULES modules not to be fatpacked
-s, --strict turn on strict mode
-q, --quiet be quiet
--color color output, default: on
--no-strip do not perform perl-strip
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/FileComposer.pm view on Meta::CPAN
#// define a temp file
my $temp = "temp.$$";
#// copy data in sample file to the temp file
#// after that, rename it
open INPUT , '<', "$origin/$i_found"
or die "error: $! \n";
# my @filesize = <INPUT>;
open OUTPUT, '>>', "./$temp"
or die "cannot write to $temp, error: $!\n";
my $bar = Progress::Awesome->new(1000, style => 'rainbow', title => 'loading...');
while (<INPUT>) {
print OUTPUT $_;
$bar->inc();
select(undef, undef, undef, 0.010);
}
close(INPUT);
close(OUTPUT);
rename $temp, $filename;
$bar->finish;
view all matches for this distribution
view release on metacpan or search on metacpan
t/01_basic.t view on Meta::CPAN
no warnings 'redefine';
*App::FromUnixtime::RC = sub { +{} };
{
open my $IN, '<', \<<'_INPUT_';
id 1
name John
date 1419702037
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run;
};
close $IN;
note $stdout if $ENV{AUTHOR_TEST};
like $stdout, qr/date\s+1419702037\([^\)]+\)/;
}
{
open my $IN, '<', \<<'_INPUT_';
id 1
name John
created_on 1419692400
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run('--format' => '%Y-%m-%d %H:%M:%S');
};
close $IN;
note $stdout if $ENV{AUTHOR_TEST};
like $stdout, qr/created_on\s+1419692400\(\d+-\d+-\d+ \d+:\d+:\d+\)/;
}
{
open my $IN, '<', \<<'_INPUT_';
id 1
name John
date 2147483648
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run;
};
close $IN;
note $stdout if $ENV{AUTHOR_TEST};
like $stdout, qr/date\s+2147483648[^\(]/;
}
{
open my $IN, '<', \<<'_INPUT_';
id 1
name John
created_on 1419692400
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run('--start-bracket' => '[', '--end-bracket' => ']');
};
close $IN;
note $stdout if $ENV{AUTHOR_TEST};
like $stdout, qr/created_on\s+1419692400\[.+\]/;
}
{
open my $IN, '<', \<<'_INPUT_';
id 1
name John
value 1419692400
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run('--re' => 'value');
};
close $IN;
note $stdout if $ENV{AUTHOR_TEST};
like $stdout, qr/value\s+1419692400\(.+\)/;
}
{
open my $IN, '<', \<<'_INPUT_';
id 1
name John
created_on 1419692400
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run('--no-re' => 'created');
};
close $IN;
note $stdout if $ENV{AUTHOR_TEST};
like $stdout, qr/created_on\s+1419692400[^\(]/;
}
{
open my $IN, '<', \<<'_INPUT_';
1419692400
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run;
};
close $IN;
t/01_basic.t view on Meta::CPAN
}
{
no warnings 'redefine';
*App::FromUnixtime::RC = sub { +{ re => 'value'} };
open my $IN, '<', \<<'_INPUT_';
id 1
name John
value 1419692400
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run;
};
close $IN;
t/01_basic.t view on Meta::CPAN
}
{
no warnings 'redefine';
*App::FromUnixtime::RC = sub { +{ re => ['foobar', 'value'] } };
open my $IN, '<', \<<'_INPUT_';
id 1
name John
value 1419692400
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run;
};
close $IN;
t/01_basic.t view on Meta::CPAN
like $stdout, qr/value\s+1419692400\(.+\)/;
*App::FromUnixtime::RC = sub { +{} };
}
{
open my $IN, '<', \<<'_INPUT_';
id 1
foo_date2 1419692400
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run;
};
close $IN;
note $stdout if $ENV{AUTHOR_TEST};
like $stdout, qr/foo_date2\s+1419692400\(.+\)/;
}
{
open my $IN, '<', \<<'_INPUT_';
id 1
foo_date2 419692400
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run('--min-time' => 1000000000);
};
close $IN;
note $stdout if $ENV{AUTHOR_TEST};
like $stdout, qr/foo_date2\s+419692400[^\(]/;
}
{
open my $IN, '<', \<<'_INPUT_';
id 1
expired_at 1419692400
_INPUT_
local *STDIN = *$IN;
my ($stdout, $strerr) = capture {
App::FromUnixtime->run;
};
close $IN;
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-id view on Meta::CPAN
# my $mode = '>';
# if ($filename =~ /^\s*(>{1,2})\s*(.*)$/) {
# ($mode, $filename) = ($1, $2);
# }
# open $OUT, $mode, $filename
# or YAML::Old::Mo::Object->die('YAML_DUMP_ERR_FILE_OUTPUT', $filename, "$!");
# }
# binmode $OUT, ':utf8';
# local $/ = "\n";
# print $OUT Dump(@_);
# unless (ref $filename eq 'GLOB') {
# close $OUT
# or do {
# my $errsav = $!;
# YAML::Old::Mo::Object->die('YAML_DUMP_ERR_FILE_OUTPUT_CLOSE', $filename, $errsav);
# }
# }
#}
#
#sub LoadFile {
script/_genpass-id view on Meta::CPAN
# if (openhandle $filename) {
# $IN = $filename;
# }
# else {
# open $IN, '<', $filename
# or YAML::Old::Mo::Object->die('YAML_LOAD_ERR_FILE_INPUT', $filename, "$!");
# }
# binmode $IN, ':utf8';
# return Load(do { local $/; <$IN> });
#}
#
script/_genpass-id view on Meta::CPAN
# Can't parse node
#YAML_PARSE_ERR_BAD_EXPLICIT
# Unsupported explicit transfer: '%s'
#YAML_DUMP_USAGE_DUMPCODE
# Invalid value for DumpCode: '%s'
#YAML_LOAD_ERR_FILE_INPUT
# Couldn't open %s for input:\n%s
#YAML_DUMP_ERR_FILE_CONCATENATE
# Can't concatenate to YAML file %s
#YAML_DUMP_ERR_FILE_OUTPUT
# Couldn't open %s for output:\n%s
#YAML_DUMP_ERR_FILE_OUTPUT_CLOSE
# Error closing %s:\n%s
#YAML_DUMP_ERR_NO_HEADER
# With UseHeader=0, the node must be a plain hash or array
#YAML_DUMP_WARN_BAD_NODE_TYPE
# Can't perform serialization for node type: '%s'
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-wordlist view on Meta::CPAN
# my $mode = '>';
# if ($filename =~ /^\s*(>{1,2})\s*(.*)$/) {
# ($mode, $filename) = ($1, $2);
# }
# open $OUT, $mode, $filename
# or YAML::Old::Mo::Object->die('YAML_DUMP_ERR_FILE_OUTPUT', $filename, "$!");
# }
# binmode $OUT, ':utf8';
# local $/ = "\n";
# print $OUT Dump(@_);
# unless (ref $filename eq 'GLOB') {
# close $OUT
# or do {
# my $errsav = $!;
# YAML::Old::Mo::Object->die('YAML_DUMP_ERR_FILE_OUTPUT_CLOSE', $filename, $errsav);
# }
# }
#}
#
#sub LoadFile {
script/_genpass-wordlist view on Meta::CPAN
# if (openhandle $filename) {
# $IN = $filename;
# }
# else {
# open $IN, '<', $filename
# or YAML::Old::Mo::Object->die('YAML_LOAD_ERR_FILE_INPUT', $filename, "$!");
# }
# binmode $IN, ':utf8';
# return Load(do { local $/; <$IN> });
#}
#
script/_genpass-wordlist view on Meta::CPAN
# Can't parse node
#YAML_PARSE_ERR_BAD_EXPLICIT
# Unsupported explicit transfer: '%s'
#YAML_DUMP_USAGE_DUMPCODE
# Invalid value for DumpCode: '%s'
#YAML_LOAD_ERR_FILE_INPUT
# Couldn't open %s for input:\n%s
#YAML_DUMP_ERR_FILE_CONCATENATE
# Can't concatenate to YAML file %s
#YAML_DUMP_ERR_FILE_OUTPUT
# Couldn't open %s for output:\n%s
#YAML_DUMP_ERR_FILE_OUTPUT_CLOSE
# Error closing %s:\n%s
#YAML_DUMP_ERR_NO_HEADER
# With UseHeader=0, the node must be a plain hash or array
#YAML_DUMP_WARN_BAD_NODE_TYPE
# Can't perform serialization for node type: '%s'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GhostWork.pm view on Meta::CPAN
LTSV-label
CSV-col JSON5-label meanings
--------------------------------------------------------------
csv All columns by CSV format
1 when_ When barcode was read ?
2 where_ Where barcode was read ? (COMPUTERNAME)
3 who Who read the barcode ?
4 what What barcode read ?
5 towhich Which status after barcode was read ?
6 why Why become its status ? (optional)
7 howmanysec How many seconds to make this record
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Git/Workflow/Command/Recent.pm view on Meta::CPAN
-m --month Show changed files from the last month
-a --all Show recent based on local and remote branches
-r --remote Show recent based on remotes only
-t --tag Show recent based on tags only
OUTPUT:
-b --branch Show the output by what's changed in each branch
-D --depth[=]int
Truncate files to this number of directories (allows showing
areas that have changed)
-u --users Show the output by who has made the changes
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Glacier/Command/Put.pm view on Meta::CPAN
my ($self, $vaultname, $localname, $remotename) = @_;
$remotename = basename($localname) unless defined($remotename);
my $st = stat($localname)
or $self->abend(EX_NOINPUT, "can't stat \"$localname\": $!");
unless (S_ISREG($st->mode)) {
$self->abend(EX_NOPERM, "\"$localname\" is not a regular file");
}
my $size = $st->size;
if ($size == 0) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Gre.pm view on Meta::CPAN
=item * "x" makes it an excluding filter
=back
=head1 OUTPUT STYLES
You can specify the output style with the -y option:
-y1 groups output by filename, with each matching line prepended
with it's line number. This is the default.
view all matches for this distribution
view release on metacpan or search on metacpan
setup/import_export/perl.pl view on Meta::CPAN
my ($header, $footer) = ('', '') ;
eval "use Pod::Select ; use Pod::Text;" ;
die $@ if $@ ;
open INPUT, '<', $file_name or die "get_base64_data: Can't open '$file_name'!\n" ;
open my $out, '>', \my $all_pod or die "Can't redirect to scalar output: $!\n";
my $parser = new Pod::Select();
$parser->parse_from_filehandle(\*INPUT, $out);
$all_pod .= '=cut' ; #add the =cut taken away by above parsing
my @guiio_pods ;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/HTTPTinyUtils.pm view on Meta::CPAN
cmdline_aliases => {
delete => {summary => 'Shortcut for --method DELETE', is_flag=>1, code=>sub { $_[0]{method} = 'DELETE' } },
get => {summary => 'Shortcut for --method GET' , is_flag=>1, code=>sub { $_[0]{method} = 'GET' } },
head => {summary => 'Shortcut for --method HEAD' , is_flag=>1, code=>sub { $_[0]{method} = 'HEAD' } },
post => {summary => 'Shortcut for --method POST' , is_flag=>1, code=>sub { $_[0]{method} = 'POST' } },
put => {summary => 'Shortcut for --method PUT' , is_flag=>1, code=>sub { $_[0]{method} = 'PUT' } },
},
},
attributes => {
'x.name.is_plural' => 1,
'x.name.singular' => 'attribute',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/HTTP_Proxy_IMP/IMP.pm view on Meta::CPAN
use Hash::Util 'lock_ref_keys';
use Compress::Raw::Zlib;
no warnings 'experimental'; # smartmatch
use Carp;
my %METHODS_RFC2616 = map { ($_,1) } qw( GET HEAD POST PUT DELETE OPTIONS CONNECT TRACE );
my %METHODS_WITHOUT_RQBODY = map { ($_,1) } qw( GET HEAD DELETE CONNECT );
my %METHODS_WITH_RQBODY = map { ($_,1) } qw( POST PUT );
my %CODE_WITHOUT_RPBODY = map { ($_,1) } qw(204 205 304);
my %METHODS_WITHOUT_RPBODY = map { ($_,1) } qw(HEAD);
# we want plugins to suppport the HTTP Request innterface
my $interface = [
view all matches for this distribution
view release on metacpan or search on metacpan
share/static/jquery-1.4.2.js view on Meta::CPAN
}, s.timeout);
}
// Send the data
try {
xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
} catch(e) {
jQuery.handleError(s, xhr, null, e);
// Fire the complete handlers
complete();
}
view all matches for this distribution