view release on metacpan or search on metacpan
doc/cookbook/index.rst view on Meta::CPAN
.. include:: ../common.defs
.. _ch-cookbook:
Macro Cookbook
**************
This section provides examples for how to extend |RB| functionality on the fly
through the use of macros. Some of these examples are from real-world usage and
others are contrived examples. But all will hopefully contribute to aiming |RB|
view all matches for this distribution
view release on metacpan or search on metacpan
tools/shipwright-package view on Meta::CPAN
export REPO=${HOME}/shipwright-sd-${TODAY}.git/
#export REPO=/tmp/shipwright-sd-${TODAY}.git/
export SHIPWRIGHT_REPOSITORY="git:file://$REPO"
export MIN_PERL=5.008006
export SKIP="--skip=Pod::Simple,Module::Signature,Test::Pod,Test::Most,Quantum::SuperPositions,Test::Pod::Coverage,Test::Distribution,Pod::Readme,Archive::Tar,HTML::Lint,Prophet,Encode,Date::Calc,Test::Cukes,Quantum::Superpositions,Test::Memory::Cycl...
export IMPORT="shipwright import --min-perl-version=$MIN_PERL $SKIP --log-file - --log-level debug"
rm -rf $REPO
shipwright create
# Optional deps we still want
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/Module/Build.pm view on Meta::CPAN
=item API Reference (L<Module::Build::API>)
This is a reference to the C<Module::Build> API.
=item Cookbook (L<Module::Build::Cookbook>)
This document demonstrates how to accomplish many common tasks. It
covers general command line usage and authoring of F<Build.PL>
scripts. Includes working examples.
local/lib/perl5/Module/Build.pm view on Meta::CPAN
C<MakeMaker>, which was released in 2006.
If you don't need to retain compatibility with old versions (pre-6.31) of C<ExtUtils::MakeMaker> or
are starting a fresh Perl installation we recommend you use
C<install_base> instead (and C<INSTALL_BASE> in C<ExtUtils::MakeMaker>).
See L<Module::Build::Cookbook/Installing in the same location as
ExtUtils::MakeMaker> for further information.
=back
local/lib/perl5/Module/Build.pm view on Meta::CPAN
modify it under the same terms as Perl itself.
=head1 SEE ALSO
perl(1), L<Module::Build::Cookbook>, L<Module::Build::Authoring>,
L<Module::Build::API>, L<ExtUtils::MakeMaker>
F<META.yml> Specification:
L<CPAN::Meta::Spec>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SimpleScan/Cookbook.pm view on Meta::CPAN
use strict;
=head1 NAME
App::SimpleScan::Cookbook
=head1 DESCRIPTION
This is a documentation-only module that describes how to use C<simple_scan>,
and outlines some techniques you can use for some common Web testing problems.
view all matches for this distribution
view release on metacpan or search on metacpan
share/public/slides.js view on Meta::CPAN
if (!config.mode)
config.mode= 'obs';
if (config.code_highlight === undefined && window.hljs)
config.code_highlight= function(el){ window.hljs.highlightElement(el) }
if (config.mode == 'presenter' && (config.key == null || config.key.length == 0))
config.key= null;//TODO: getCookieVal('access_key');
self.config= config
// Generic button and checkbox handlers
this._button_dispatch= function(ev) {
try {
self[this.dataset.method].call(self, ev);
view all matches for this distribution
view release on metacpan or search on metacpan
socialcalc/simpleedit14.pl view on Meta::CPAN
use URI;
use HTTP::Daemon;
use HTTP::Status;
use HTTP::Response;
use Socket;
use CGI::Cookie;
use SocialCalcServersideUtilities;
my $datadir = "se2-data/";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SpamcupNG/UserAgent.pm view on Meta::CPAN
use strict;
use Carp qw(confess);
use LWP::UserAgent 6.72;
use HTTP::Request 6.44;
use Log::Log4perl 1.57 qw(get_logger :levels);
use HTTP::CookieJar::LWP 0.014;
use Mozilla::PublicSuffix v1.0.6;
use HTTP::Request::Common 6.44 qw(POST);
our $VERSION = '0.020'; # VERSION
lib/App/SpamcupNG/UserAgent.pm view on Meta::CPAN
bless $self, $class;
my $ua = LWP::UserAgent->new(
agent => ( $self->{name} . '/' . $version ),
protocols_allowed => ['https'],
cookie_jar => HTTP::CookieJar::LWP->new
);
# for form based authentication
push @{ $ua->requests_redirectable }, 'POST';
$self->{user_agent} = $ua;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/bash/myapp.bash view on Meta::CPAN
case $INDEX in
0)
__comp_current_options || return
__myapp_dynamic_comp 'commands' 'config'$'\t''configuration'$'\n''convert'$'\t''Various unit conversions'$'\n''cook'$'\t''Cook something'$'\n''data'$'\t''output some data'$'\n''help'$'\t''Show command help'$'\n''palindrome'$'\t''Check if a st...
;;
*)
# subcmds
case ${MYWORDS[0]} in
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Menlo/Sqitch.pm view on Meta::CPAN
File-Slurper
File-chdir
File-pushd
HTML-Parser
HTML-Tagset
HTTP-CookieJar
HTTP-Cookies
HTTP-Date
HTTP-Message
HTTP-Negotiate
HTTP-Tiny
HTTP-Tinyish
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
provides:
Module::Build 0.4231
Module::Build::Base 0.4231
Module::Build::Compat 0.4231
Module::Build::Config 0.4231
Module::Build::Cookbook 0.4231
Module::Build::Dumper 0.4231
Module::Build::Notes 0.4231
Module::Build::PPMMaker 0.4231
Module::Build::Platform::Default 0.4231
Module::Build::Platform::MacOS 0.4231
cpanfile.snapshot view on Meta::CPAN
Mojo::Cache undef
Mojo::Collection undef
Mojo::Content undef
Mojo::Content::MultiPart undef
Mojo::Content::Single undef
Mojo::Cookie undef
Mojo::Cookie::Request undef
Mojo::Cookie::Response undef
Mojo::DOM undef
Mojo::DOM::CSS undef
Mojo::DOM::HTML undef
Mojo::Date undef
Mojo::DynamicMethods undef
cpanfile.snapshot view on Meta::CPAN
Mojo::Transaction::HTTP undef
Mojo::Transaction::WebSocket undef
Mojo::URL undef
Mojo::Upload undef
Mojo::UserAgent undef
Mojo::UserAgent::CookieJar undef
Mojo::UserAgent::Proxy undef
Mojo::UserAgent::Server undef
Mojo::UserAgent::Transactor undef
Mojo::Util undef
Mojo::WebSocket undef
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/Module/Build.pm view on Meta::CPAN
=item API Reference (L<Module::Build::API>)
This is a reference to the C<Module::Build> API.
=item Cookbook (L<Module::Build::Cookbook>)
This document demonstrates how to accomplish many common tasks. It
covers general command line usage and authoring of F<Build.PL>
scripts. Includes working examples.
local/lib/perl5/Module/Build.pm view on Meta::CPAN
C<MakeMaker>, which was released in 2006.
If you don't need to retain compatibility with old versions (pre-6.31) of C<ExtUtils::MakeMaker> or
are starting a fresh Perl installation we recommend you use
C<install_base> instead (and C<INSTALL_BASE> in C<ExtUtils::MakeMaker>).
See L<Module::Build::Cookbook/Installing in the same location as
ExtUtils::MakeMaker> for further information.
=back
local/lib/perl5/Module/Build.pm view on Meta::CPAN
modify it under the same terms as Perl itself.
=head1 SEE ALSO
perl(1), L<Module::Build::Cookbook>, L<Module::Build::Authoring>,
L<Module::Build::API>, L<ExtUtils::MakeMaker>
F<META.yml> Specification:
L<CPAN::Meta::Spec>
view all matches for this distribution
view release on metacpan or search on metacpan
bin/todo.pl view on Meta::CPAN
$sid, '/', $uri->host, $uri->port,
0, 0, undef, 1);
}
if($config{site}) {
# Somehow, localhost gets normalized to localhost.localdomain,
# and messes up HTTP::Cookies when we try to set cookies on
# localhost, since it doesn't send them to
# localhost.localdomain.
$config{site} =~ s/localhost/127.0.0.1/;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/fixtures/custom_phase/cpanfile.snapshot view on Meta::CPAN
provides:
Module::Build 0.4231
Module::Build::Base 0.4231
Module::Build::Compat 0.4231
Module::Build::Config 0.4231
Module::Build::Cookbook 0.4231
Module::Build::Dumper 0.4231
Module::Build::Notes 0.4231
Module::Build::PPMMaker 0.4231
Module::Build::Platform::Default 0.4231
Module::Build::Platform::MacOS 0.4231
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Zapzi/Fetchers/URL.pm view on Meta::CPAN
our $VERSION = '0.017'; # VERSION
use Carp;
use Data::Validate::URI 0.06;
use HTTP::Tiny;
use HTTP::CookieJar;
use Moo;
with 'App::Zapzi::Roles::Fetcher';
lib/App/Zapzi/Fetchers/URL.pm view on Meta::CPAN
sub fetch
{
my $self = shift;
my $jar = HTTP::CookieJar->new;
my $http = HTTP::Tiny->new(cookie_jar => $jar);
my $url = $self->source;
my $response = $http->get($url, $self->_http_request_headers());
view all matches for this distribution
view release on metacpan or search on metacpan
examples/test_example.pl view on Meta::CPAN
plan skip_all
=> "App::ZofCMS::Test::Plugin required for testing plugin"
if $@;
plugin_ok(
'Cookies',
{ set_cookies => [ [foo => 'bar'] ], },
{ foo => 'bar' },
{ foo => 'bar' },
);
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
provides:
Module::Build 0.4231
Module::Build::Base 0.4231
Module::Build::Compat 0.4231
Module::Build::Config 0.4231
Module::Build::Cookbook 0.4231
Module::Build::Dumper 0.4231
Module::Build::Notes 0.4231
Module::Build::PPMMaker 0.4231
Module::Build::Platform::Default 0.4231
Module::Build::Platform::MacOS 0.4231
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanel.pm view on Meta::CPAN
$url->path(join '/', '', "cpsess$url_token", @$parts);
$url->query(%$args) if $args;
CORE::state $ua = Mojo::UserAgent->new; # state as needs to live long enough to complete request
$ua->$method(
$url->to_abs . "",
{ Cookie => "cpsession=$cookie_token" },
@extra_args,
);
}
sub read_file {
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/build.fresh.log view on Meta::CPAN
All tests successful.
Files=20, Tests=252, 1 wallclock secs ( 0.07 usr 0.02 sys + 0.63 cusr 0.10 csys = 0.82 CPU)
Result: PASS
Manifying 4 pod documents
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/Sub/Exporter.pm
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/Sub/Exporter/Cookbook.pod
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/Sub/Exporter/Tutorial.pod
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/Sub/Exporter/Util.pm
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/man/man3/Sub::Exporter.0
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/man/man3/Sub::Exporter::Cookbook.0
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/man/man3/Sub::Exporter::Tutorial.0
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/man/man3/Sub::Exporter::Util.0
Appending installation info to /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/darwin-2level/perllocal.pod
-> OK
Successfully installed Sub-Exporter-0.987
t/data/build.fresh.log view on Meta::CPAN
Configuring libwww-perl-6.13
Running Makefile.PL
Warning: prerequisite File::Listing 6 not found.
Warning: prerequisite HTML::Entities 0 not found.
Warning: prerequisite HTML::HeadParser 0 not found.
Warning: prerequisite HTTP::Cookies 6 not found.
Warning: prerequisite HTTP::Daemon 6 not found.
Warning: prerequisite HTTP::Negotiate 6 not found.
Warning: prerequisite Net::HTTP 6.07 not found.
Warning: prerequisite WWW::RobotRules 6 not found.
Checking if your kit is complete...
t/data/build.fresh.log view on Meta::CPAN
Checking if you have Encode::Locale 0 ... Yes (1.04)
Checking if you have FindBin 0 ... Yes (1.51)
Checking if you have HTTP::Daemon 6 ... No
Checking if you have LWP::MediaTypes 6 ... Yes (6.02)
Checking if you have IO::Select 0 ... Yes (1.22)
Checking if you have HTTP::Cookies 6 ... No
Checking if you have Net::HTTP 6.07 ... No
Checking if you have HTTP::Response 6 ... Yes (6.04)
Checking if you have Test::More 0 ... Yes (1.001014)
Checking if you have HTTP::Status 6 ... Yes (6.03)
Checking if you have URI::Escape 0 ... Yes (3.31)
t/data/build.fresh.log view on Meta::CPAN
Checking if you have HTML::Entities 0 ... No
Checking if you have Test 0 ... Yes (1.26)
Checking if you have Net::FTP 2.58 ... Yes (3.05)
Checking if you have MIME::Base64 2.1 ... Yes (3.15)
Checking if you have HTTP::Request 6 ... Yes (6.00)
==> Found dependencies: WWW::RobotRules, HTML::HeadParser, HTTP::Negotiate, File::Listing, HTTP::Daemon, HTTP::Cookies, Net::HTTP, HTML::Entities
Searching WWW::RobotRules on mirror http://mirrors.gossamer-threads.com/CPAN ...
--> Working on WWW::RobotRules
Fetching http://mirrors.gossamer-threads.com/CPAN/authors/id/G/GA/GAAS/WWW-RobotRules-6.02.tar.gz
-> OK
Unpacking WWW-RobotRules-6.02.tar.gz
t/data/build.fresh.log view on Meta::CPAN
Appending installation info to /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/darwin-2level/perllocal.pod
-> OK
Successfully installed HTTP-Daemon-6.01
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/darwin-2level/.meta/HTTP-Daemon-6.01/MYMETA.json
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/darwin-2level/.meta/HTTP-Daemon-6.01/install.json
Searching HTTP::Cookies on mirror http://mirrors.gossamer-threads.com/CPAN ...
--> Working on HTTP::Cookies
Fetching http://mirrors.gossamer-threads.com/CPAN/authors/id/G/GA/GAAS/HTTP-Cookies-6.01.tar.gz
-> OK
Unpacking HTTP-Cookies-6.01.tar.gz
Entering HTTP-Cookies-6.01
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.04)
Configuring HTTP-Cookies-6.01
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for HTTP::Cookies
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.04)
Checking if you have HTTP::Date 6 ... Yes (6.02)
Checking if you have HTTP::Headers::Util 6 ... Yes (6.03)
Checking if you have Time::Local 0 ... Yes (1.2300)
Building and testing HTTP-Cookies-6.01
Manifying 3 pod documents
PERL_DL_NONLAZY=1 "/Volumes/amaretto/Users/ether/perl5/perlbrew/perls/21.11/bin/perl5.21.11" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/cookies.t .. ok
All tests successful.
Files=1, Tests=66, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.04 cusr 0.00 csys = 0.06 CPU)
Result: PASS
Manifying 3 pod documents
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/HTTP/Cookies.pm
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/HTTP/Cookies/Microsoft.pm
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/HTTP/Cookies/Netscape.pm
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/man/man3/HTTP::Cookies.0
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/man/man3/HTTP::Cookies::Microsoft.0
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/man/man3/HTTP::Cookies::Netscape.0
Appending installation info to /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/darwin-2level/perllocal.pod
-> OK
Successfully installed HTTP-Cookies-6.01
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/darwin-2level/.meta/HTTP-Cookies-6.01/MYMETA.json
Installing /Volumes/amaretto/Users/ether/.perlbrew/libs/21.11@std/lib/perl5/darwin-2level/.meta/HTTP-Cookies-6.01/install.json
Searching Net::HTTP on mirror http://mirrors.gossamer-threads.com/CPAN ...
--> Working on Net::HTTP
Fetching http://mirrors.gossamer-threads.com/CPAN/authors/id/M/MS/MSCHILLI/Net-HTTP-6.07.tar.gz
-> OK
Unpacking Net-HTTP-6.07.tar.gz
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
#pod
#pod =for :list
#pod * C<agent> â
#pod A user-agent string (defaults to 'HTTP-Tiny/$VERSION'). If C<agent> â ends in a space character, the default user-agent string is appended.
#pod * C<cookie_jar> â
#pod An instance of L<HTTP::CookieJar> â or equivalent class that supports the C<add> and C<cookie_header> methods
#pod * C<default_headers> â
#pod A hashref of default headers to apply to requests
#pod * C<local_address> â
#pod The local IP address to bind to
#pod * C<keep_alive> â
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
sub _validate_cookie_jar {
my ($class, $jar) = @_;
# duck typing
for my $method ( qw/add cookie_header/ ) {
Carp::croak(qq/Cookie jar must provide the '$method' method\n/)
unless ref($jar) && ref($jar)->can($method);
}
return;
}
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
proxies and redirection. It also correctly resumes after EINTR.
If L<IO::Socket::IP> 0.25 or later is installed, HTTP::Tiny will use it instead
of L<IO::Socket::INET> for transparent support for both IPv4 and IPv6.
Cookie support requires L<HTTP::CookieJar> or an equivalent class.
=head1 METHODS
=head2 new
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
C<agent> â A user-agent string (defaults to 'HTTP-Tiny/$VERSION'). If C<agent> â ends in a space character, the default user-agent string is appended.
=item *
C<cookie_jar> â An instance of L<HTTP::CookieJar> â or equivalent class that supports the C<add> and C<cookie_header> methods
=item *
C<default_headers> â A hashref of default headers to apply to requests
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=back
=head1 CONTRIBUTORS
=for stopwords Alan Gardner Alessandro Ghedini Brad Gilbert Chris Nehren Weyl Claes Jakobsson Clinton Gormley Dean Pearce Edward Zborowski James Raspass Jeremy Mates Jess Robinson Lukas Eklund Martin J. Evans Martin-Louis Bright Mike Doherty Olaf A...
=over 4
=item *
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
Tom Hukins <tom@eborcom.com>
=item *
Tony Cook <tony@develop-help.com>
=back
=head1 COPYRIGHT AND LICENSE
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpm/Tutorial.pm view on Meta::CPAN
requires 'Path::Class', 0.26,
dist => "KWILLIAMS/Path-Class-0.26.tar.gz";
# use dist + mirror
requires 'Cookie::Baker',
dist => "KAZEBURO/Cookie-Baker-0.08.tar.gz",
mirror => "http://cpan.cpantesters.org/";
# use the full URL
requires 'Try::Tiny', 0.28,
url => "http://backpan.perl.org/authors/id/E/ET/ETHER/Try-Tiny-0.28.tar.gz";
view all matches for this distribution
view release on metacpan or search on metacpan
utils/combine-head view on Meta::CPAN
# Copyright 2009, zakflash and MonsieurVideo
#
# This file includes various perl modules, see their original source for their
# copyright and license terms.
use HTTP::Cookies ();
use HTTP::Config ();
use HTTP::Request::Common ();
use LWP::Protocol::http ();
use XML::Simple ();
use WWW::Mechanize::Link ();
view all matches for this distribution
view release on metacpan or search on metacpan
data/index.html view on Meta::CPAN
<br><img src="Images/camel.jpg" alt="#"><a href="http://www.theperlreview.com/Issues/v0i5.shtml">"Design Patterns: Iterators"</a>, <i>The Perl Review</i>, <font class="date">Sep 2002</font>
<br><img src="Images/camel.jpg" alt="#"><a href="http://www.theperlreview.com/Issues/v0i6.shtml">"Simple RSS with Perl"</a>, <i>The Perl Review</i>, <font class="date">Nov 2002</font>
<br><img src="Images/camel.jpg" alt="#"><img src="Images/mac.jpg" alt="*"><a href="http://www.macdevcenter.com/pub/a/mac/2002/11/22/itunes_perl.html">"Controlling iTunes with Perl"</a>, MacDevCenter, <font class="date">Nov 2002</font>
<br><img src="Images/camel.jpg" alt="#">"Better Documenation Through Testing", <i>The Perl Journal</i>, <font class="date">Nov 2002</font>
<br><img src="Images/camel.jpg" alt="#">"Ruby versus Perl", <i>The Perl Journal</i>, <font class="date">Dec 2002</font>
<br><img src="Images/camel.jpg" alt="#">"Sharing Cookies", <i>The Perl Journal</i>, <font class="date">Jan 2003</font>
<br><img src="Images/mac.jpg" alt="*"><a href="http://www.macdevcenter.com/pub/a/mac/2003/01/17/itunes.html">"Cleaning iTunes"</a>, MacDevCenter, <font class="date">Jan 2003</font>
<br><img src="Images/camel.jpg" alt="#">"Amazon.com Wish Lists", <i>The Perl Journal</i>, <font class="date">Feb 2003</font>
<br><img src="Images/camel.jpg" alt="#">"Creating Perl Application Distributions", <i>The Perl Journal</i>, <font class="date">Mar 2003</font>
<br><img src="Images/camel.jpg" alt="#">"Google and Perl", <i>The Perl Journal</i>, <font class="date">May 2003</font>
<br><img src="Images/camel.jpg" alt="#">"CPAN in the Desert", <i>The Perl Journal</i>, <font class="date">Jan 2004</font>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/lcpan/Manual.pm view on Meta::CPAN
This distribution contains the following documentation pages:
=over
=item * L<App::lcpan::Manual::Cookbook>
=item * L<App::lcpan::Manual::FAQ>
=item * L<App::lcpan::Manual::Internals>
view all matches for this distribution
view release on metacpan or search on metacpan
module; use dist name instead.
- [subcommand rdeps] Like deps, fix query by linking using module
name instead of module ID.
- Remove App::lcpan::Manual::Cookbook (now in App-lcpan-Manual).
1.049 2020-04-11 Released-By: PERLANCAR; Urgency: high
- [bugfix] A logic bug in --dont-uniquify option broke deps & rdeps
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/livehttperf.pm view on Meta::CPAN
# request
if ( ! defined $req && $l =~ /^[A-Z]+ /) {
my $req_hdrs = $l;
my $cl;
REQ: while( defined( $l = $fh[++$i] ) ) {
if ( ! $OPTS{reuse_cookies} && $l =~ /^Cookie/i ) {
next REQ;
}
if ( $l =~ /^HTTP\// ) { # reached response block
$i--;
last REQ;
lib/App/livehttperf.pm view on Meta::CPAN
# status line is parsed up to \n by HTTP::Response->parse()
my $res_hdrs = "$l\n";
RES: while( $l = $fh[++$i] ) {
last RES if $l =~ /^\-{58}/;
unless ( $OPTS{reuse_cookies} ) {
next if $l =~ /^Set-Cookie/i;
}
$res_hdrs .= $l;
}
$res = HTTP::Response->parse($res_hdrs);
unless ( $ua_opts{keep_alive} ) {
lib/App/livehttperf.pm view on Meta::CPAN
-h, --hostname=STRING Override hostname in requests and set Host header to
STRING.
Default: no change
-rc, --reuse_cookies Use Cookie/Set-Cookie headers from recorded session.
Default: do not reuse
Sessions:
-n, --repeat=NUM Repeat recorded session NUM times.
Default: 10
view all matches for this distribution
view release on metacpan or search on metacpan
mimi.fatpack view on Meta::CPAN
}
];
$x; }
MODULE_BUILD_CONFIGDATA
$fatpacked{"Module/Build/Cookbook.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MODULE_BUILD_COOKBOOK';
package Module::Build::Cookbook;use strict;use warnings;our$VERSION='0.03';
MODULE_BUILD_COOKBOOK
$fatpacked{"Module/Build/Dumper.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'MODULE_BUILD_DUMPER';
package Module::Build::Dumper;use strict;use warnings;our$VERSION='0.03';use Data::Dumper;sub _data_dump {my ($self,$data)=@_;return ("do{ my " .Data::Dumper->new([$data],['x'])->Purity(1)->Terse(0)->Sortkeys(1)->Dump().'$x; }')}1;
MODULE_BUILD_DUMPER
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/mio.pm view on Meta::CPAN
}
use strict;
use warnings;
# sub commify straight from Perl Cookbook,
# Chapter 2.17. "Putting Commas in Numbers"
sub commify {
my $self = shift;
my $text = reverse $_[0];
$text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g;
view all matches for this distribution
view release on metacpan or search on metacpan
script/news view on Meta::CPAN
MemoryMax=100M
Environment="NNTPSERVER=localhost"
Environment="NEWS_INTRO_ID=<u4d0i0$n72d$1@sibirocobombus.campaignwiki>"
ExecStart=/home/alex/perl5/perlbrew/perls/perl-5.32.0/bin/perl /home/alex/perl5/perlbrew/perls/perl-5.32.0/bin/news daemon
=head2 Cookies
The web app stores name, username and password in an encrypted cookie which
expires one week after posting an article.
=head2 Caching
view all matches for this distribution
view release on metacpan or search on metacpan
t/oddmuse-wiki.pl view on Meta::CPAN
# Internal variables:
our ($q, $bol, $OpenPageName, %Page, %Translate, %IndexHash, @IndexList,
@HtmlStack, @HtmlAttrStack, @Blocks, @Flags,
%Includes, $FootnoteNumber, $CollectingJournal, $HeaderIsPrinted,
%Locks, $Fragment, $Today, $ModulesDescription, %RssInterwikiTranslate,
$Message, $Now, %RecentVisitors, %MyInc, $WikiDescription, %InterSite, %OldCookie);
# Can be set outside the script: $DataDir, $UseConfig, $ConfigFile, $ModuleDir,
# $ConfigPage, $AdminPass, $EditPass, $ScriptName, $FullUrl, $RunCGI.
# 1 = load config file in the data directory
t/oddmuse-wiki.pl view on Meta::CPAN
# -1 = disabled, 0 = 10s; 1 = partial HTML cache; 2 = HTTP/1.1 caching
our $UseCache = 2;
our $SiteName = 'Wiki'; # Name of site (used for titles)
our $HomePage = 'HomePage'; # Home page
our $CookieName = 'Wiki'; # Name for this wiki (for multi-wiki sites)
our $MaxPost = 1024 * 210; # Maximum 210K posts (about 200K for pages)
our $StyleSheet = ''; # URL for CSS stylesheet (like '/wiki.css')
our $StyleSheetPage = ''; # Page for CSS sheet
our $LogoUrl = ''; # URL for site logo ('' for no logo)
t/oddmuse-wiki.pl view on Meta::CPAN
our %Languages = ();
our @KnownLocks = qw(main diff index merge visitors); # locks to remove
our $LockExpiration = 60; # How long before expirable locks are expired
our %LockExpires = (diff=>1, index=>1, merge=>1, visitors=>1); # locks to expire after some time
our %LockCleaners = (); # What to do if a job under a lock gets a signal like SIGINT. e.g. 'diff' => \&CleanDiff
our %CookieParameters = (username=>'', pwd=>'', homepage=>'', theme=>'', css=>'', msg=>'', lang=>'', embed=>$EmbedWiki,
toplinkbar=>$TopLinkBar, topsearchform=>$TopSearchForm, matchingpages=>$MatchingPages, );
our %Action = (rc => \&BrowseRc, rollback => \&DoRollback,
browse => \&BrowseResolvedPage, maintain => \&DoMaintain,
random => \&DoRandom, pagelock => \&DoPageLock,
history => \&DoHistory, editlock => \&DoEditLock,
t/oddmuse-wiki.pl view on Meta::CPAN
$Message = ''; # Warnings and non-fatal errors.
InitLinkPatterns(); # Link pattern can be changed in config files
InitModules(); # Modules come first so that users can change module variables in config
InitConfig(); # Config comes as early as possible; remember $q is not available here
InitRequest(); # get $q with $MaxPost; set these in the config file
InitCookie(); # After InitRequest, because $q is used
InitVariables(); # After config, to change variables, after InitCookie for GetParam
}
sub InitModules {
if ($UseConfig and $ModuleDir and IsDir($ModuleDir)) {
foreach my $lib (Glob("$ModuleDir/*.p[ml]")) {
t/oddmuse-wiki.pl view on Meta::CPAN
AllPagesList() unless $id;
InterInit() if $InterMap and (not $id or $id eq $InterMap);
%RssInterwikiTranslate = () if not $id or $id eq $RssInterwikiTranslate; # special since rarely used
}
sub InitCookie {
undef $q->{'.cookies'}; # Clear cache if it exists (for SpeedyCGI)
my $cookie = $q->cookie($CookieName);
%OldCookie = split(/$FS/, UrlDecode($cookie));
my %provided = map { $_ => 1 } $q->param;
for my $key (keys %OldCookie) {
SetParam($key, $OldCookie{$key}) unless $provided{$key};
}
CookieUsernameFix();
CookieRollbackFix();
}
sub CookieUsernameFix {
# Only valid usernames get stored in the new cookie.
my $name = GetParam('username', '');
$q->delete('username');
if (not $name) {
# do nothing
t/oddmuse-wiki.pl view on Meta::CPAN
} else {
SetParam('username', $name);
}
}
sub CookieRollbackFix {
my @rollback = grep(/rollback-(\d+)/, $q->param);
if (@rollback and $rollback[0] =~ /(\d+)/) {
SetParam('to', $1);
$q->delete('action');
SetParam('action', 'rollback');
t/oddmuse-wiki.pl view on Meta::CPAN
return $html;
}
$url = $ScriptName . (($UsePathInfo and $action !~ /=/) ? '/' : '?') . $action;
my $nameLink = $q->a({-href=>$url}, $name);
my %headers = (-uri=>$url);
my $cookie = Cookie();
$headers{-cookie} = $cookie if $cookie;
return $q->redirect(%headers);
}
sub DoRandom {
t/oddmuse-wiki.pl view on Meta::CPAN
return 1 if $q->http('HTTP_IF_NONE_MATCH') and GetParam('cache', $UseCache) >= 2
and $q->http('HTTP_IF_NONE_MATCH') eq PageEtag();
}
sub PageEtag {
my ($changed, %params) = CookieData();
return UrlEncode(join($FS, $LastUpdate||$Now, sort(values %params))); # no CTL in field values
}
sub FileFresh { # old files are never stale, current files are stale when the page was modified
return 1 if $q->http('HTTP_IF_NONE_MATCH') and GetParam('cache', $UseCache) >= 2
t/oddmuse-wiki.pl view on Meta::CPAN
$headers{-etag} = PageEtag();
}
$headers{-type} = GetParam('mime-type', $type);
$headers{-status} = $status if $status;
$headers{-Content_Encoding} = $encoding if $encoding;
my $cookie = Cookie();
$headers{-cookie} = $cookie if $cookie;
if ($q->request_method() eq 'HEAD') {
print $q->header(%headers), "\n\n"; # add newlines for FCGI because of exit()
exit; # total shortcut -- HEAD never expects anything other than the header!
}
return $q->header(%headers);
}
sub CookieData {
my ($changed, %params);
foreach my $key (keys %CookieParameters) {
my $default = $CookieParameters{$key};
my $value = GetParam($key, $default);
$params{$key} = $value if $value ne $default;
# The cookie is considered to have changed under the following
# condition: If the value was already set, and the new value is
# not the same as the old value, or if there was no old value, and
# the new value is not the default.
my $change = (defined $OldCookie{$key} ? ($value ne $OldCookie{$key}) : ($value ne $default));
$changed = 1 if $change; # note if any parameter changed and needs storing
}
return $changed, %params;
}
sub Cookie {
my ($changed, %params) = CookieData(); # params are URL encoded
if ($changed) {
my $cookie = join(UrlEncode($FS), %params); # no CTL in field values
return $q->cookie(-name=>$CookieName, -value=>$cookie, -expires=>'+2y', secure=>$ENV{'HTTPS'}, httponly=>1);
}
return '';
}
sub GetHtmlHeader { # always HTML!
t/oddmuse-wiki.pl view on Meta::CPAN
}
sub DoPassword {
my $id = shift;
print GetHeader('', T('Password')), $q->start_div({-class=>'content password'});
print $q->p(T('Your password is saved in a cookie, if you have cookies enabled. Cookies may get lost if you connect from another machine, from another account, or using another software.'));
if (not $AdminPass and not $EditPass) {
print $q->p(T('This site does not use admin or editor passwords.'));
} else {
if (UserIsAdmin()) {
print $q->p(T('You are currently an administrator on this site.'));
view all matches for this distribution
view release on metacpan or search on metacpan
bin/plackbench view on Meta::CPAN
A simple example:
sub {
my $request = shift;
$request->header( Cookie => 'session=mysid' );
return;
}
The file can contain any valid Perl code, but the last statement in the file
must be a subroutine reference.
view all matches for this distribution