view release on metacpan or search on metacpan
CONTRIBUTING view on Meta::CPAN
not, then try <https://github.com/tobyink> or submit a bug report.
(As far as I'm concerned the lack of a link is a bug.) Many of my
distributions are also mirrored at <https://bitbucket.org/tobyink>.
To submit the patch, do a pull request on GitHub or Bitbucket, or
attach a diff file to a bug report. Unless otherwise stated, I'll
assume that your contributions are licensed under the same terms as
the rest of the project.
(If using git, feel free to work in a branch. For Mercurial, I'd
prefer bookmarks within the default branch.)
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
intercepts all future C<use> and C<require> requests. (code references in
C<@INC> were in 5.6.x, but were not documented until 5.8.0, which extends the
feature to allow objects in C<@INC>).
The subroutine in C<@INC> then finds the module using the normal C<@INC> path,
opens the file, and attaches a source filter that adds
"use strict; use warnings;" to the start of every file. This is naughty - it's
not a documented feature, it may be changed or removed with no notice, and the
current implementation is slightly buggy in subtle cases.
=head2 EXPORT
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Activator/Emailer.pm view on Meta::CPAN
Subject => 'Test Subject',
);
$mailer->send( $tt_vars );
Reuse the mailer object to send another mail to someone else using a different
body template, plus an attachment:
$mailer->set_cc( '' );
$mailer->set_to( 'someone_else@other-domain.com' );
$mailer->set_html_body( '/path/to/html_body.tt' );
$tt_vars = $my_alternate_data_hashref;
$mailer->attach( Type => 'application/pdf',
Path => 'path/to/doc.pdf',
Filename => 'doc.pdf',
Disposition => 'attachment' );
$mailer->send( $tt_vars );
=head1 DESCRIPTION
C<Activator::Emailer> is a simple wrapper to L<Mime::Lite>,
lib/Activator/Emailer.pm view on Meta::CPAN
mailer_type => 'Gmail',
mailer_args => [ username => 'user@gmail.com',
password => '123456'
],
);
$mailer->attach( Type => 'application/pdf',
Path => 'path/to/doc.pdf',
Filename => 'invoice.pdf',
Disposition => 'attachment'
$mailer->send( $tt_vars );
The next section shows how to simplify this.
=head1 CONFIGURATION
lib/Activator/Emailer.pm view on Meta::CPAN
my $config = Activator::Registry->get( 'Activator::Emailer' ) || {};
my $self = Hash::Merge::merge( \%args, $config );
bless ( $self ), $pkg;
$self->{attachments} = [];
my $args = { mailer => $self->{mailer_type} };
if ( keys %{ $self->{mailer_args} } ) {
$args->{mailer_args} = [ %{ $self->{mailer_args} } ];
}
$self->{sender} = Email::Send->new( $args );
lib/Activator/Emailer.pm view on Meta::CPAN
);
push @email_args, ( Type => 'multipart/alternative' );
my $email = MIME::Lite->new( @email_args );
$email->attach(
Type => 'TEXT',
Data => $text_body,
);
$email->attach(
Type => 'text/html',
Data => $html_body,
);
foreach my $attachment( @{ $self->{attachments} } ) {
$email->attach( @$attachment );
}
DEBUG("----------------------------------------\nCreated email:\n".
$email->as_string .
"\n----------------------------------------"
lib/Activator/Emailer.pm view on Meta::CPAN
if ( catch my $e ) {
Activator::Exception::Emailer->throw( 'send_error', $e );
}
}
=head2 attach( %args )
Attach an item to this email. When C<send()> is called, C<%args> is
just passed through to the L<MIME::Lite> attach function.
=cut
sub attach {
my ( $self, %attachment ) = @_;
push @{ $self->{attachments} }, [ %attachment ];
}
=head2 valid_email ( $email )
Sanity check on the email address. Throws exception on failure.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Activiti/Rest/Client.pm view on Meta::CPAN
params => {},
method => "GET"
);
Activiti::Rest::Response->from_http_response($res);
}
=head2 task_attachments
Get all attachments on a task
Parameters:
taskId
equal to rest call:
GET runtime/tasks/:taskId/attachments
=cut
sub task_attachments {
my($self,%args)=@_;
my $res = $self->ua->request(
path => "/runtime/tasks/".uri_escape($args{taskId})."/attachments",
params => {},
method => "GET"
);
Activiti::Rest::Response->from_http_response($res);
}
=head2 task_attachment
Get an attachment on a task
Parameters:
taskId
attachmentId
equal to rest call:
GET runtime/tasks/:taskId/comments/:attachmentId
=cut
sub task_attachment {
my($self,%args)=@_;
my $res = $self->ua->request(
path => "/runtime/tasks/".uri_escape($args{taskId})."/attachments/".uri_escape($args{attachmentId}),
params => {},
method => "GET"
);
Activiti::Rest::Response->from_http_response($res);
}
=head2 task_attachment_content
Get the content for an attachment on a task
Parameters:
taskId
attachmentId
equal to rest call:
GET runtime/tasks/:taskId/attachments/:attachmentId/content
=cut
sub task_attachment_content {
my($self,%args)=@_;
my $res = $self->ua->request(
path => "/runtime/tasks/".uri_escape($args{taskId})."/attachments/".uri_escape($args{attachmentId})."/content",
params => {},
method => "GET"
);
Activiti::Rest::Response->from_http_response($res);
}
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
eg/benchmark.pl view on Meta::CPAN
affix( $libfile, [ 'sin', '_affix_sin_tc' ], [ CC_THISCALL_GNU, Double ] => Double );
#
my $ffi = FFI::Platypus->new( api => 1 );
$ffi->lib($libfile);
my $ffi_func = $ffi->function( sin => ['double'] => 'double' );
$ffi->attach( [ sin => 'ffi_sin' ] => ['double'] => 'double' );
# prime the pump
my $sin = sin 500;
{
die 'oops' if $hand_rolled->(500) != $sin;
eg/benchmark.pl view on Meta::CPAN
},
call_thiscall => sub {
my $x = 0;
while ( $x < $depth ) { my $n = $sin_thiscall->($x); $x++ }
},
ffi_attach => sub {
my $x = 0;
while ( $x < $depth ) { my $n = ffi_sin($x); $x++ }
},
ffi_function => sub {
my $x = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Agent/TCLI/Transport/XMPP.pm view on Meta::CPAN
$self->Verbose("PostResponse: sender(".$sender->ID.")
Code(".$response->code.") \n");
# my $request = $response->request;
# The response should come back with either message nodes attached
# or something in the sender/postback stack to provide
# directions on where to go. If there a XMPP in the sender/postback
# that means the request should get transmitted as a whole request (iq),
# and not as a message/body, so let Transmit handle that.
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Query.pm view on Meta::CPAN
# ÐодÑоединиÑÑ Ð² ÑезÑлÑÑÐ°Ñ Ð·Ð°Ð¿ÑоÑа ÑезÑлÑÑÐ°Ñ Ð´ÑÑгого запÑоÑа
#
# $authors = query "SELECT id, name FROM author";
# # $authors as [{id => 1, name => "..."}, ...];
#
# query_attach $authors => 'books:id:author_id' => "SELECT author_id, title FROM book"
#
sub query_attach {
my ($rows, $attach, $query, %kw) = @_;
($attach, my $key1, my $key2) = split /:/, $attach;
my %row1 = map { $_->{$attach} = []; ($_->{$key1} => $_) } @$rows;
my $rows2 = query $query, %kw;
for my $row2 (@$rows2) {
my $id = $row2->{$key2} // die "Not $key2 in query!";
my $row1 = $row1{$id} // die "Not $key1=$id in main rows!";
push @{$row1->{$attach}}, $row2;
}
wantarray? @$rows2: $rows2
}
lib/Aion/Query.pm view on Meta::CPAN
],
};
\%author # --> $rows
=head2 query_attach ($rows, $attach, $query, %kw)
Includes the result of another query into the result of a query.
C<$attach> contains three keys separated by a colon: the key for the data to be attached, a column from C<$rows> and a column from C<$query>. Rows are merged across columns.
The function returns an array with the result of the query (C<$query>), into which you can attach something else.
my $authors = query "SELECT id, name FROM author";
my $res = [
{name => "Pushkin A.S.", id => 1},
lib/Aion/Query.pm view on Meta::CPAN
{name => "Alice", id => 3},
];
$authors # --> $res
my @books = query_attach $authors => "books:id:author_id" => "SELECT author_id, title FROM book ORDER BY title";
my $attaches = [
{name => "Pushkin A.S.", id => 1, books => [
{title => "Kiss in night", author_id => 1},
{title => "Mir", author_id => 1},
]},
{name => "Pushkin A.", id => 2, books => []},
{name => "Alice", id => 3, books => [
{title => "Mips as cpu", author_id => 3},
]},
];
$authors # --> $attaches
my $books = [
{title => "Kiss in night", author_id => 1},
{title => "Mips as cpu", author_id => 3},
{title => "Mir", author_id => 1},
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
view all matches for this distribution