view release on metacpan or search on metacpan
Amethyst.pm view on Meta::CPAN
1;
__END__
# Below is stub documentation for your module. You better edit it!
=head1 NAME
Amethyst - Perl extension for blah blah blah
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amibroker/OLE/Interface.pm view on Meta::CPAN
You can run various analysis based on the action supplied.
But before that you need to pass APX file,
APX file is an important file to Amibroker engine. It is like the rule book to the amibroker.
The analysis project file (.apx extension) is human-readable self-explanatory XML-format file that can be written/edited/modified from any language / any text editor.
APX file includes all settings and formula needed in single file that is required to run analysis.
APX file instructs what the amibroker engine has to do.
NOTE: Be very careful in creating the apx file.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Plugin/L10N.pm view on Meta::CPAN
=head2 run amon2-xgettext.pl
$ cd your_amon2_proj_base_dir
$ perl amon2-xgettext.pl en ja fr zh-tw
=head2 edit .po files
$ vim po/ja.po
$ vim po/zh-tw.po
=head1 Add Amon2 Context Method
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Plugin/Web/FillInForm.pm view on Meta::CPAN
__PACKAGE__->load_plugins(qw/Web::FillInForm/);
1;
package MyApp::Web::C::Root;
sub post_edit {
my $c = shift;
$c->fillin_form($c->req());
$c->render('edit.html');
}
1;
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
- fixed typo. thanks @zakame
0.04
- edited pod & 'Test::Requires' append to cpanfile
0.03
- fixed get/post/put/delete functions and set $submap for instance caching
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amon2/Plugin/Web/FillInFormLite.pm view on Meta::CPAN
use Amon2::Lite;
__PACKAGE__->load_plugins(qw/Web::FillInFormLite/);
post '/edit' => sub {
my $c = shift;
unless (is_valid()) {
$c->fillin_form($c->req);
return $c->render('edit.html');
}
$c->dbh->update($c->req());
return $c->redirect('/finished');
};
view all matches for this distribution
view release on metacpan or search on metacpan
To create a patch:
```console
git clone https://github.com/analizo/analizo.git
cd analizo
edit file
git commit file
git format-patch origin
```
This will generate patch files named like
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.old view on Meta::CPAN
# This Makefile is for the Ananke::SqlLink extension to perl.
#
# It was generated automatically by MakeMaker version
# 6.03 (Revision: 1.63) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
# ANY CHANGES MADE HERE WILL BE LOST!
#
# MakeMaker ARGV: ()
#
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.old view on Meta::CPAN
# This Makefile is for the Ananke::Template extension to perl.
#
# It was generated automatically by MakeMaker version
# 6.03 (Revision: 1.63) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
# ANY CHANGES MADE HERE WILL BE LOST!
#
# MakeMaker ARGV: ()
#
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.old view on Meta::CPAN
# This Makefile is for the Ananke::Utils extension to perl.
#
# It was generated automatically by MakeMaker version
# 6.03 (Revision: 1.63) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
# ANY CHANGES MADE HERE WILL BE LOST!
#
# MakeMaker ARGV: ()
#
view all matches for this distribution
view release on metacpan or search on metacpan
t/1062-util-valid-callbacks.t view on Meta::CPAN
ok(!defined $final_neg, 'final_cb no match = undef');
};
subtest 'real-world: data filtering pipeline' => sub {
my @transactions = (
{ amount => 100, type => 'credit' },
{ amount => -50, type => 'debit' },
{ amount => 200, type => 'credit' },
{ amount => -30, type => 'debit' },
{ amount => 0, type => 'adjustment' },
);
# Register callbacks for transaction filtering
register_callback('is_credit', sub { $_[0]->{type} eq 'credit' });
register_callback('is_debit', sub { $_[0]->{type} eq 'debit' });
register_callback('non_zero', sub { $_[0]->{amount} != 0 });
my @credits = grep_cb(\@transactions, 'is_credit');
is(scalar(@credits), 2, 'two credits');
my @debits = grep_cb(\@transactions, 'is_debit');
is(scalar(@debits), 2, 'two debits');
my @active = grep_cb(\@transactions, 'non_zero');
is(scalar(@active), 4, 'four non-zero transactions');
# Calculate totals
my $credit_total = 0;
$credit_total += $_->{amount} for @credits;
is($credit_total, 300, 'credit total = 300');
};
subtest 'real-world: validation framework' => sub {
# Register validation callbacks
register_callback('has_name', sub { defined $_[0]->{name} && length($_[0]->{name}) > 0 });
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Android/ElectricSheep/Automator.pm view on Meta::CPAN
# until this is resolved I am copying Android::ADB
# into my distribution, fixing the issues and renaming it to
# Android::ElectricSheep::Automator::ADB
# and using that. When the issue is resolved I will go back
# using Android::ADB
# Credits for Android::ADB (now Android::ElectricSheep::Automator::ADB)
# go to Marius Gavrilescu (marius@ieval.ro)
# as seen in:
# https://metacpan.org/pod/Android::ADB
#
use Android::ElectricSheep::Automator::ADB;
lib/Android/ElectricSheep/Automator.pm view on Meta::CPAN
# sanitise the text a bit
# replace spaces with %s,
# also newlines seem not to be supported so replaces these as well
$text =~ s/[\n \t]/%s/g;
# first tap on the text edit widget at the specified coordinates to get focus
if( $self->tap($params) ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, failed to tap on the position of the recipient of the text input"); return 1 }
usleep(0.8);
# and send the text
# adb shell input text 'hello%sworld'
lib/Android/ElectricSheep/Automator.pm view on Meta::CPAN
@position = ($m->[0], $m->[1]);
} elsif( exists($params->{'bounds'}) && defined($m=$params->{'bounds'}) ){
@position = ( int(($m->[1]->[0] + $m->[0]->[0])/2), int(($m->[1]->[1] + $m->[0]->[1])/2) );
} else { $log->error("${whoami} (via $parent), line ".__LINE__." : error, input parameter 'position' (as ['x','y']) or 'bounds' (as [lefttopX,lefttopY],[bottomrightX,bottomrighY]) was not specified."); return 1 }
# first tap on the text edit widget at the specified coordinates to get focus
if( $self->tap($params) ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, failed to tap on the position of the recipient of the text input"); return 1 }
usleep(0.8);
# from: https://stackoverflow.com/questions/32433303/clear-edit-text-adb
# the simplest way is input keycombination 113 29 && input keyevent 67
# but may not work
# then we try the lame way by erasing all chars one after the other
# part1:
my @cmd = ('input', 'keycombination', '113', '29');
lib/Android/ElectricSheep/Automator.pm view on Meta::CPAN
if( $verbosity > 0 ){ $log->info("${whoami} (via $parent), line ".__LINE__." : sending command to adb: @cmd") }
$res = $self->adb->shell(@cmd);
if( ! defined $res ){ $log->error(join(" ", @cmd)."\n${whoami} (via $parent), line ".__LINE__." : error, above shell command has failed, got undefined result, most likely shell command did not run at all, this should not be happening. Info: this is...
if( $res->[0] != 0 ){ $log->error(join(" ", @cmd)."\n${whoami} (via $parent), line ".__LINE__." : error, above shell command has failed (Info: this is alternative part1), with:\nSTDOUT:\n".$res->[1]."\n\nSTDERR:\n".$res->[2]."\nEND."); return 1 }
# alternative/part2
# optional number of chars in the text-edit box, meaning how many
# times to press backspace, default is here (250)
# this is only needed for the second method (the failsafe)
my $numchars = (exists($params->{'num-characters'}) && defined($params->{'num-characters'}) && ($params->{'num-characters'}=~/^\d+$/) ) ? $params->{'num-characters'} : 250;
@cmd = ('input', 'keyevent', '--longpress', ('KEYCODE_DEL')x$numchars);
if( $verbosity > 0 ){ $log->info("${whoami} (via $parent), line ".__LINE__." : sending command to adb: @cmd") }
lib/Android/ElectricSheep/Automator.pm view on Meta::CPAN
C<lib/Android/ElectricSheep/Automator/Plugins/Apps/Viber.pm>
for how this is done for the message-sending text-input widget
of the Viber app.
C<$params> is a HASH_REF which must contain C<text>
and one of the two position (of the text-edit widget)
specifiers C<position> or C<bounds>:
=over 4
=item * B<C<text>>
the text to write on the text edit widget. At the
moment, this must be plain ASCII string, not unicode.
No spaces are accepted.
Each space character must be replaced with C<%s>.
=item * B<C<position>>
should be an ARRAY_REF
as the C<X,Y> coordinates of the point to "tap" in order
to get the focus of the text edit widget, preceding the
text input.
=item * B<C<bounds>>
should be an ARRAY_REF of a bounding rectangle
lib/Android/ElectricSheep/Automator.pm view on Meta::CPAN
devices, in which case a failsafe way is employed
which deletes characters one after the other for
250 times.
C<$params> is a HASH_REF which must contain
one of the two position (of the text-edit widget)
specifiers C<position> or C<bounds>:
=over 4
=item <B<C<position>>
should be an ARRAY_REF
as the C<X,Y> coordinates of the point to "tap" in order
to get the focus of the text edit widget, preceding the
text input.
=item B<C<bounds>>
should be an ARRAY_REF of a bounding rectangle
lib/Android/ElectricSheep/Automator.pm view on Meta::CPAN
=item B<C<num-characters>>
how many times to press the backspace? Default is 250!
But if you know the length of the text currently at
the text-edit widget then enter this here.
=back
It returns C<0> on success, C<1> on failure.
lib/Android/ElectricSheep/Automator.pm view on Meta::CPAN
E.g. the plugin L<Android::ElectricSheep::Automator::Plugins::Apps::Viber>
will not send a message via Viber but it will mock it.
The live tests will sometimes fail because, so far,
something unexpected happened in the device. For example,
in testing sending input text to a text-edit widget,
the calendar will be opened and a new entry will be added
and its text-edit widget will be targeted. Well, sometimes
the calendar app will give you some notification
on startup and this messes up with the focus.
Other times, the OS will detect that some app is taking too
long to launch and pops up a notification about
"I<something is not responding, shall I close it>".
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Android/Releases.pm view on Meta::CPAN
);
our %SPEC;
# BEGIN FRAGMENT id=meta
# note: This section is generated by a script. Do not edit manually!
# src-file: /zpool_host_mnt/mnt/home/s1/repos/gudangdata/table/android_release/meta.yaml
# src-revision: bcd38551cd0cf53ff658d0eb432d480b80dd5fcf
# revision-date: Fri Nov 6 11:58:56 2015 +0700
# generate-date: Fri Nov 3 16:03:48 2017
# generated-by: /zpool_host_mnt/mnt/home/s1/repos/gudangdata/bin/gen-perl-meta-snippet
lib/Android/Releases.pm view on Meta::CPAN
pk => "version",
summary => "Android releases",
};
# END FRAGMENT id=meta
# BEGIN FRAGMENT id=data
# note: This section is generated by a script. Do not edit manually!
# src-file: /zpool_host_mnt/mnt/home/s1/repos/gudangdata/table/android_release/data.csv
# src-revision: ce50e84b7fbb58d0e0f138c8f27a3f01b40a03e9
# revision-date: Fri Nov 3 16:03:30 2017 +0700
# generate-date: Fri Nov 3 16:03:48 2017
# generated-by: /zpool_host_mnt/mnt/home/s1/repos/gudangdata/bin/gen-perl-data-snippet
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Anki/Import.pm view on Meta::CPAN
version 0.030
=head1 OVERVIEW
Efficiently generate formatted Anki notes with your
text editor for easy import into Anki.
=head1 SYNOPSIS
# Step 1: Create the source file
lib/Anki/Import.pm view on Meta::CPAN
# Step 3: Import the resultant files into Anki
=head1 DESCRIPTION
Inputting notes into Anki can be a tedious chore. C<Anki::Import> lets you
you generate Anki notes with your favorite text editor (e.g. vim, BBEdit, Atom,
etc.) so you can enter formatted notes into Anki's database more efficiently.
At a minimum, you should have basic familiarity with using your computer's
command line terminal to make use of this program.
=head2 Steps for creating, processing and imorting new notes
=head3 Step 1: Generate the notes with your text editor
First, you create a specially formatted source file which
C<Anki::Import> will process. The source file is a simple text file with
basic formatting rules you must follow.
lib/Anki/Import.pm view on Meta::CPAN
=head3 Source file requirements and limitations
=head4 Use UTF-8 encoding
The source file should be a plain text file with UTF-8 encoding. UTF-8
is likely the default encoding method for your editor but check your editor's
settings and documentation for further details.
=head4 Avoid tabs
Since tab characters are used by Anki to split your fields, you should
lib/Anki/Import.pm view on Meta::CPAN
=head3 Getting the most from C<Anki::Import>
By itself, C<Anki::Import> will make it easier for you to format and
input your notes especially if you do a lot of basic HTML formatting. However,
the huge productivity gains of C<Anki::Import> can only be unlocked by getting
proficient wih your text editor of choice.
For example, you can generate templates for each of the note types you use to
make data entry exceptionally painless. And with a text editor like vim, you
can automate the generation of the formatting codes used by C<Anki::Import>
and make Anki note creation joyful, or at least much less tedious.
Teaching you how to use and optimize your text editor for C<Anki::Import> is
well beyond the scope of this document. But if you take the time now and do the
up front work of learning your text editor and tweaking it for use with
C<Anki::Import>, you will save a lot of time in the long run.
In the future, vim configurations and plugins for use with C<Anki::Import>
may be released as they are developed to help you get going faster with vim.
Unfortunately, other text editors cannot be supported as there are far too many
and far too little time to get familiar with all their features.
=head1 USAGE
C<anki_import> can be run from the command line or from within another perl
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnnoCPAN/Control.pm view on Meta::CPAN
}, "show_dist");
}
=item $obj->Edit
The edit screen (like Show, but includes the edit form).
=cut
sub Edit {
my ($self, $vars) = @_;
lib/AnnoCPAN/Control.pm view on Meta::CPAN
({
podver => $notepos->podver,
note => $notepos->note,
%$vars,
#message => "here ($section, $podver)" . $podver->pod->name,
}, "edit");
}
sub Raw_note {
my ($self, $vars) = @_;
my $notepos = $self->param_obj('NotePos');
lib/AnnoCPAN/Control.pm view on Meta::CPAN
sub Create {
my ($self, $vars) = @_;
$vars ||= {};
# get user, see if can edit
my $user = $self->user
or return $self->error("Not logged in; can't create note");
my $section = $self->param_obj('Section');
my $podver = $section->podver;
({
podver => $podver,
section => $section,
%$vars,
#message => "here ($section, $podver)" . $podver->name,
}, "edit");
}
sub _search_podver {
my ($self, $vars) = @_;
$vars ||= {};
lib/AnnoCPAN/Control.pm view on Meta::CPAN
my ($self) = @_;
my $notepos = $self->param_obj('NotePos');
my $section = $self->param_obj('Section');
# get user, see if can edit
my $user = $self->user
or return $self->_error("Not logged in; can't move");
$user->can_move($notepos->note)
or return $self->_error("Move not authorized");
lib/AnnoCPAN/Control.pm view on Meta::CPAN
my $notepos = $self->param_obj('NotePos');
my $note = $notepos->note;
my $section = $notepos->section;
# get user, see if can edit
my $user = $self->user
or return $self->_error("not logged in; can't move");
$user->can_hide($note)
or return $self->_error("move not authorized");
lib/AnnoCPAN/Control.pm view on Meta::CPAN
return $self->Main($vars) if $vars->{error};
$self->Show($vars);
}
# to save new note, need section and note text
# to save edited note, need notepos and note text
sub _save {
my ($self) = @_;
my $note_text = $self->param('note_text');
my ($note, $podver);
# get user, see if can edit
my $user = $self->user
or return $self->_error("Not logged in; can't save note");
if ($self->param('notepos')) { # edit existing note
my $notepos = $self->param_obj('NotePos');
$podver = $notepos->podver;
$note = $notepos->note;
$user->can_edit($note)
or return $self->_error("Edit not authorized");
$note->note($note_text);
$note->ip($ENV{REMOTE_ADDR});
#$note->time(time);
$note->update;
lib/AnnoCPAN/Control.pm view on Meta::CPAN
#$self->Main({message => "You have logged out"});
}
sub Prefs {
my ($self) = @_;
return $self->error("Can't edit prefs without logging in first!")
unless $self->user;
({}, 'prefs');
}
sub Save_prefs {
my ($self) = @_;
# XXX untaint
my $user = $self->user;
return $self->error("Can't edit prefs without logging in first!")
unless $user;
AnnoCPAN::DBI::Prefs->search(user => $user)->delete_all;
for my $name (@{AnnoCPAN::Config->option('prefs')}) {
AnnoCPAN::DBI::Prefs->create({user => $user, name => $name,
value => $self->param($name) || '' });
view all matches for this distribution
view release on metacpan or search on metacpan
t/ansible-test1/ansible.cfg view on Meta::CPAN
# If set, configures the path to the Vault password file as an alternative to
# specifying --vault-password-file on the command line.
#vault_password_file = /path/to/vault_password_file
# format of string {{ ansible_managed }} available within Jinja2
# templates indicates to users editing templates files will be replaced.
# replacing {file}, {host} and {uid} and strftime codes with proper values.
#ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
# {file}, {host}, {uid}, and the timestamp can all interfere with idempotence
# in some situations so the default is a static string:
#ansible_managed = Ansible managed
view all matches for this distribution
view release on metacpan or search on metacpan
src/ppport.h view on Meta::CPAN
ppport.h -- Perl/Pollution/Portability Version 3.24
Automatically created by Devel::PPPort running under perl 5.020000.
Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
includes in parts/inc/ instead.
Use 'perldoc ppport.h' to view the documentation below.
----------------------------------------------------------------------
src/ppport.h view on Meta::CPAN
sub strip
{
my $self = do { local(@ARGV,$/)=($0); <> };
my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
$copy =~ s/^(?=\S+)/ /gms;
$self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
eval { require Devel::PPPort };
\$@ and die "Cannot require Devel::PPPort, please install.\\n";
if (eval \$Devel::PPPort::VERSION < $VERSION) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ante/Deluvian/Dialog.pm view on Meta::CPAN
$self->listbox(\@lines, input => "text");
}
1;
__END__
# Below is stub documentation for your module. You'd better edit it!
=head1 NAME
Ante::Deluvian::Dialog - Perl extension for very old style user interaction
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Any/Template/ProcessDir.pm view on Meta::CPAN
unlink($readme_file);
write_file(
$readme_file,
"Files in this directory generated from "
. $self->source_dir . ".\n",
"Do not edit files here, as they will be overwritten. Edit the source instead!"
);
}
}
sub generate_source_symlink {
lib/Any/Template/ProcessDir.pm view on Meta::CPAN
0775. No effect if you are using a single directory.
=item file_create_mode
Permissions mode to use when creating destination files. Defaults to 0444
(read-only), so that destination files are not accidentally edited.
=item ignore_files
Coderef which takes a full pathname and returns true if the file should be
ignored. By default, all files will be considered.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyData/Format/Mp3.pm view on Meta::CPAN
$str =~ s/^TAG(.*)/$1/;
my $genre = $str;
$genre =~ s/^.*(.)$/$1/g;
$str =~ s/(.)$//g;
$genre = unpack( 'C', $genre );
my @genres =("Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B", "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks...
$genre = $genres[$genre] || '';
my @cols = unpack 'A30 A30 A30 A4 A30', $str;
my $comment = pop @cols;
#print $comment;
@cols = map{$_ || ''} @cols;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Campfire.pm view on Meta::CPAN
1;
=head1 DESCRIPTION
L<http://campfirenow.com/> API required C<token> to `authorization`.
you can check it out on L<https://E<lt>usernameE<gt>.campfirenow.com/member/edit>.
=head2 ATTRIBUTES
=over
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/CouchDB/Database.pm view on Meta::CPAN
sub bulk_docs {
my ( $self, $docs, $options ) = @_;
my ( $cv, $cb ) = cvcb( $options, undef, $self->json_encoder );
my %props = (); ## _bulk_docs properties go to the request body
foreach my $property (qw(all_or_nothing new_edits)) {
if (my $value = delete $options->{$property}) {
## convert the respective value to the JSON boolean type
$props{$property} = $value eq 'false' ? JSON::false() : JSON::true();
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
MANIFEST.SKIP view on Meta::CPAN
\.deb$
\bdebian
\bDebian_CPANTS.txt$
-stamp$
# Avoid editors files
^.cproject\b
^.includepath\b
^.project\b
^.settings\b
^.vscode\b
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/EC2/Tiny.pm view on Meta::CPAN
=back
=head1 CREDITS
Credit goes to Mark Allen for L<Net::EC2::Tiny>.
=head1 AUTHOR
Sawyer X <xsawyerx@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/EditText.pm view on Meta::CPAN
our %READER;
our @EDITOR = ("rxvt", "-e", "vim");
=head1 NAME
AnyEvent::EditText - An easy way to startup a text editor
=head1 VERSION
Version 0.2
lib/AnyEvent/EditText.pm view on Meta::CPAN
=head1 SYNOPSIS
my $content = "Hello There!";
AnyEvent::EditText::edit ($content, sub {
my ($newcontent, $has_changed) = @_;
if ($has_changed) {
print "the content was edited";
}
});
=head1 DESCRIPTION
This little module will start a text editor in a seperate process without
stopping the current process. Usually something like a terminal with a vim
instance running in it will be started, but also a graphical editor could be
used (like I<gedit> or I<gvim>).
The editor will get the content passed to the C<edit> routine as temporary
file, and after you are done editing it (closed the editor) the callback
will be called with the possibly new content.
=head1 FUNCTIONS
=head2 set_editor (@sysargs)
This function configures the editor used. C<@sysargs> is a list of
arguments for the C<system> function, which will be called like this
by C<edit>:
system (@sysargs, $filename);
The default editor used will be:
AnyEvent::EditText::set_editor ("rxvt", "-e", "vim");
=cut
sub set_editor {
@EDITOR = @_;
}
=head2 edit ($content, $callback)
This routine will write C<$content> to a temporary file, fork
and call the editing process. After the process terminates the
temporary file is read and erased.
After that the content is sent back to the calling process, where the
C<$callback> is called with two arguments: The first will be the new content
and the second a flag indicating whether the content has changed.
=cut
sub edit {
my ($content, $finish) = @_;
pipe (my $par_rdr, my $child_wtr);
$par_rdr->autoflush (1);
$child_wtr->autoflush (1);
lib/AnyEvent/EditText.pm view on Meta::CPAN
});
} else {
$par_rdr->close;
die "couldn't fork: $!" unless defined $pid;
my ($fh, $filename) = tempfile ("text_edit_XXXXX", DIR => "/tmp");
print $fh $content;
close $fh;
my $ex = system (@EDITOR, $filename);
unless ($ex == 0) {
lib/AnyEvent/EditText.pm view on Meta::CPAN
Robin Redeker, C<< <elmex at ta-sa.org> >>
=head1 TODO
This module should probably first look in the environment to determine
which editor and terminal to use. This will be fixed in the next release.
=head1 BUGS
Please report any bugs or feature requests to
C<bug-text-edit at rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-Edit>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
=head1 SUPPORT
view all matches for this distribution
view release on metacpan or search on metacpan
0.0.3 Fri Nov 30 10:04:43 2012 KST
- depend `Host` req header to `AnyEvent::HTTP`
0.0.2 Thu Oct 11 10:59:18 2012 KST
- support editing multiple header at once
- enhancement test
- tidied all source code
view all matches for this distribution
view release on metacpan or search on metacpan
# This file is generated by Dist::Zilla::Plugin::CPANFile v6.037
# Do not edit this file directly. To change prereqs, edit the `dist.ini` file.
requires "AnyEvent" => "0";
requires "AnyEvent::I3" => "0.19";
requires "Carp" => "0";
requires "Data::Compare" => "0";
view all matches for this distribution
view release on metacpan or search on metacpan
C<set> prefix.
All configuration data is stored in a human-readable (JSON) config file
stored in F<~/.perl-anyevent-mp> (or F<%appdata%/perl-anyevent-mp> on
loser systems, or wherever C<$ENV{PERL_ANYEVENT_MP_RC}> points to). Feel
free to look at it or edit it, the format is relatively simple.
=head2 SPECIFYING ARGUMENTS
Arguments can be specified just as with any other shell command, with a
few special cases:
my $node = shift @ARGV || $NODE;
$| = 1;
print <<EOF;
Entering interactive shell - no commandline editing of course (use rlfe etc.).
\= display a list of nodes
\=name switch to another node
package P switch to package P when evaluating
\$ECHO contains the name of a port that echos everything sent to it
view all matches for this distribution
view release on metacpan or search on metacpan
t/02_changing.t view on Meta::CPAN
my $cv = AE::cv;
my @dictionary = (qw(FINE â â CLOUD RAIN â â â â
⬠⪠â«));
diag("This test rewrite your current pasteboard. And do not edit pasteboard on running this test.");
### stash pasteboard content.
my $tmp_file = File::Temp->new( SUFFIX => '.pb' );
my $tmp_filename = $tmp_file->filename;
print {$tmp_file} `pbpaste`;
view all matches for this distribution
view release on metacpan or search on metacpan
keysize (reported by Paul Howarth).
- documented Rocco fabricating statements about AnyEvent and me.
6.14 Tue Jan 31 20:00:24 CET 2012
- AnyEvent::Impl::Tk was broken due to a mysterious "die" inside,
probably an editing mistake (reported by Darin McBride).
6.13 Thu Jan 12 07:27:01 CET 2012
- AnyEvent::Util::fork_call checked for POSIX availability in the wrong way,
causing it to fail if POSIX wasn't loaded already (analysed by Rock Power).
- AnyEvent::Handle::push_read (line => did pass $1 directly, so
view all matches for this distribution