view release on metacpan or search on metacpan
lib/AWS/S3.pm view on Meta::CPAN
has 'session_token' => (
is => 'ro',
isa => 'Maybe[Str]',
lazy => 1,
default => sub { $ENV{AWS_SESSION_TOKEN} },
);
has 'region' => (
is => 'ro',
isa => 'Maybe[Str]',
lazy => 1,
default => sub { $ENV{AWS_REGION} },
);
has 'secure' => (
is => 'ro',
isa => 'Bool',
lazy => 1,
default => 0
);
has 'endpoint' => (
is => 'ro',
isa => 'Str',
lazy => 1,
default => sub {
my ( $s ) = @_;
if ( my $region = $s->region ) {
return "s3.$region.amazonaws.com"
} else {
lib/AWS/S3.pm view on Meta::CPAN
);
has 'ua' => (
is => 'ro',
isa => 'LWP::UserAgent',
default => sub { LWP::UserAgent::Determined->new }
);
has 'honor_leading_slashes' => (
is => 'ro',
isa => 'Bool',
default => sub { 0 },
);
sub request {
my ( $s, $type, %args ) = @_;
lib/AWS/S3.pm view on Meta::CPAN
my $s3 = AWS::S3->new(
access_key_id => 'E654SAKIASDD64ERAF0O',
secret_access_key => 'LgTZ25nCD+9LiCV6ujofudY1D6e2vfK0R4GLsI4H',
session_token => 'IQob3JpJZ2luXJ2VjJEL7//////////wE...',
region => 'eu-west-1', # set to relevant AWS region
honor_leading_slashes => 0, # set to allow leading slashes in bucket names, defaults to 0
);
# Add a bucket:
my $bucket = $s3->add_bucket(
name => 'foo-bucket',
lib/AWS/S3.pm view on Meta::CPAN
Defaults to creating a new instance of L<LWP::UserAgent::Determined>
=head2 honor_leading_slashes
Optional. Boolean to set if bucket names should include any leading slashes
when sent to S3 - defaults to zero
=head1 PUBLIC PROPERTIES
=head2 access_key_id
lib/AWS/S3.pm view on Meta::CPAN
Returns nothing otherwise.
=head2 add_bucket( name => $name, location => 'us-west-1' )
Attempts to create a new bucket with the name provided. The location parameter is optional
and, as per the AWS docs, will default to "us-east-1".
On success, returns the new L<AWS::S3::Bucket>
On failure, dies with the error message.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/SNS/Verify.pm view on Meta::CPAN
);
has message => (
is => 'ro',
lazy => 1,
default => sub {
my $self = shift;
return JSON::decode_json($self->body);
}
);
has certificate_string => (
is => 'ro',
lazy => 1,
default => sub {
my $self = shift;
return $self->fetch_certificate;
}
);
has certificate => (
is => 'ro',
lazy => 1,
default => sub {
my $self = shift;
return Crypt::PK::RSA->new(\$self->certificate_string);
}
);
has validate_signing_cert_url => (
is => 'ro',
lazy => 1,
default => 1,
);
sub fetch_certificate {
my $self = shift;
my $url = $self->valid_cert_url($self->message->{SigningCertURL});
lib/AWS/SNS/Verify.pm view on Meta::CPAN
}
}
=item certificate_string
By default AWS::SNS::Verify will fetch the certificate string by issuing an HTTP GET request to C<SigningCertURL>. The SigningCertURL in the message must be a AWS SNS endpoint.
If you wish to use a cached version, then pass it in.
=item validate_signing_cert_url (default: true)
If you're using a fake SNS server in your local test environment, the SigningCertURL won't be an AWS endpoint. If so, set validate_signing_cert_url to 0.
Don't ever do this in any kind of Production environment.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/SQS/Simple.pm view on Meta::CPAN
}
=head1 FUNCTIONS
No functions are exported by default.
Following functions are all available through the AWS::SQS::Simple Object.
=head2 create_queue
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/Signature/V2.pm view on Meta::CPAN
use AWS::Signature::V2;
use LWP::UserAgent->new;
my $signer = AWS::Signature::V2->new(
aws_access_key => ..., # defaults to $AWS_ACCESS_KEY
aws_secret_key => ..., # defaults to $AWS_SECRET_KEY
);
my $ua = LWP::UserAgent->new;
my $uri = URI->new('https://');
$uri->query_form(...);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/Signature4.pm view on Meta::CPAN
If a security token is provided, it overrides any values given for
-access_key or -secret_key.
If the environment variables EC2_ACCESS_KEY and/or EC2_SECRET_KEY are
set, their contents are used as defaults for -acccess_key and
-secret_key.
=cut
sub new {
lib/AWS/Signature4.pm view on Meta::CPAN
} elsif ($host =~ /^([\w-]+)\.amazonaws\.com/) {
$service = $1;
$region = 'us-east-1';
}
$service ||= 's3';
$region ||= 'us-east-1'; # default
return "$date/$region/$service/aws4_request";
}
sub _parse_scope {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/XRay.pm view on Meta::CPAN
=head2 auto_flush($mode)
Set/Get auto flush mode.
When $mode is 1 (default), segment data will be sent to xray daemon immediately after capture() called.
When $mode is 0, segment data are buffered in memory. You should call AWS::XRay->sock->flush() to send the buffered segment data or call AWS::XRay->sock->close() to discard the buffer.
=head2 AWS_XRAY_DAEMON_ADDRESS environment variable
Set the host and port of the X-Ray daemon. Default 127.0.0.1:2000
=head2 $AWS::XRay::CROAK_INVALID_NAME
When set to 1 (default 0), capture() will raise exception if a segment name is invalid.
See https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html
=over
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing or non-interactive session, always use defaults
if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/TestCustomer.pm view on Meta::CPAN
required => 1
);
has 'features' => (
is => 'ro',
default => sub { [] }
);
has 'plans' => (
is => 'ro',
default => sub { [] }
);
has 'mg' => (
is => 'ro',
required => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Abstract/Meta/Attribute.pm view on Meta::CPAN
Abstract::Meta::Attribute - Meta object attribute.
=head1 SYNOPSIS
use Abstract::Meta::Class ':all';
has '$.attr1' => (default => 0);
=head1 DESCRIPTION
An object that describes an attribute.
It includes required, data type, association validation, default value, lazy retrieval.
Name of attribute must begin with one of the follwoing prefix:
$. => Scalar,
@. => Array,
%. => Hash,
&. => Code,
lib/Abstract/Meta/Attribute.pm view on Meta::CPAN
$options{'$.storage_key'} = $storage_key;
$options{'$.mutator'} = "set_$accessor_name";
$options{'$.accessor'} = $accessor_name;
$options{'$.' . $_ } = $args{$_}
for grep {exists $args{$_}}
(qw(class required default item_accessor associated_class data_type_validation index_by the_other_end transistent storage_type));
$options{'$.perl_type'} = $supported_type{$type};
unless ($args{default}) {
if($type eq '%') {
$options{'$.default'} = sub{ {} };
} elsif ($type eq '@') {
$options{'$.default'} = sub { [] };
}
}
%options;
}
}
lib/Abstract/Meta/Attribute.pm view on Meta::CPAN
=cut
sub required { shift()->{'$.required'} }
=item default
Returns default value
=cut
sub default { shift()->{'$.default'} }
=item storage_type
Hash|Array
view all matches for this distribution
view release on metacpan or search on metacpan
'""' => 'asString',
'cmp' => 'cmp';
@ISA = qw(Exporter);
# Items to export into callers namespace by default.
@EXPORT = qw(STATUS_WAITING STATUS_PENDING STATUS_ERROR);
# Optional exports
@EXPORT_OK = qw(rearrange ACE_PARSE);
$VERSION = '1.92';
# internal cache of objects
my %MEMORY_CACHE;
my %DEFAULT_CACHE_PARAMETERS = (
default_expires_in => '1 day',
auto_purge_interval => '12 hours',
);
# Preloaded methods go here.
$Error = '';
passed to Cache::SizeAwareFileCache. For example:
-cache => {
cache_root => '/usr/tmp/acedb',
cache_depth => 4,
default_expires_in => '1 hour'
}
If not otherwise specified, the following cache parameters are assumed:
Parameter Default Value
--------- -------------
namespace Server URL (e.g. sace://localhost:2005)
cache_root /tmp/FileCache (dependent on system temp directory)
default_expires_in 1 day
auto_purge_interval 12 hours
By default, the cache is not size limited (the "max_size" property is
set to $NO_MAX_SIZE). To adjust the size you may consider calling the
Ace object's cache() method to retrieve the physical cache and then
calling the cache object's limit_size($max_size) method from time to
time. See L<Cache::SizeAwareFileCache> for more details.
=item B<-program>
By default AcePerl will use its internal compiled code calls to
establish a connection to Ace servers, and will launch a I<tace>
subprocess to communicate with local Ace databases. The B<-program>
argument allows you to customize this behavior by forcing AcePerl to
use a local program to communicate with the database. This argument
should point to an executable on your system. You may use either a
The optional B<-classmapper> argument (alias B<-class>) points to the
class you would like to return from database queries. It is provided
for your use if you subclass Ace::Object. For example, if you have
created a subclass of Ace::Object called Ace::Object::Graphics, you
can have the database return this subclass by default by connecting
this way:
$db = Ace->connect(-host => 'beta.crbm.cnrs-mop.fr',
-port => 20000100,
-class=>'Ace::Object::Graphics');
The value of B<-class> can be a hash reference consisting of AceDB
class names as keys and Perl class names as values. If a class name
does not exist in the hash, a key named _DEFAULT_ will be looked for.
If that does not exist, then Ace will default to Ace::Object.
The value of B<-class> can also be an object or a classname that
implements a class_for() method. This method will receive three
arguments containing the AceDB class name, object ID and database
handle. It should return a string indicating the perl class to
undefined value. This value can only be set at connect time, and cannot
be changed once set.
=back
If arguments are omitted, they will default to the following values:
-host localhost
-port 200005;
-path no default
-program tace
-class Ace::Object
-timeout 25
-query_timeout 120
Connect to a socket server at the indicated hostname and port. Example:
sace://stein.cshl.org:1880
If not provided, the port defaults to 2005.
=item rpcace://hostname:port
Connect to an RPC server at the indicated hostname and RPC service number. Example:
rpcace://stein.cshl.org:400000
If not provided, the port defaults to 200005
=item tace:/path/to/database
Open up the local database at F</path/to/database> using tace. Example:
"filled" or an "unfilled" object. A filled object contains the entire
contents of the object, including all tags and subtags. In the case
of certain Sequence objects, this may be a significant amount of data.
Unfilled objects consist just of the object name. They are filled in
from the database a little bit at a time as tags are requested. By
default, fetch() returns the unfilled object. This is usually a
performance win, but if you know in advance that you will be needing
the full contents of the retrieved object (for example, to display
them in a tree browser) it can be more efficient to fetch them in
filled mode. You do this by calling fetch() with the argument of
B<-fill> set to a true value.
This will call parse() to parse each of the objects found in the
indicated .ace file, returning the list of objects successfully loaded
into the database.
By default, parsing will stop at the first object that causes a parse
error. If you wish to forge on after an error, pass a true value as
the second argument to this method.
Any parse error messages are accumulated in Ace->error().
just its name. This is efficient on a network with high latency if
you expect to be touching many parts of the object (rather than
just retrieving the value of a few tags).
B<fetch_many()> retrieves objects from the database in groups of a
certain maximum size, 40 by default. This can be tuned using the
optional B<-chunksize> argument. Chunksize is only a hint to the
database. It may return fewer objects per transaction, particularly
if the objects are large.
You may provide raw Ace query string with the B<-query> argument. If
number of objects to retrieve, the offset from the beginning of the
list to retrieve from, whether the retrieved objects should be filled
initially. You can use B<-total> to discover the total number of
objects that match, while only retrieving a portion of the list.
By default, grep uses a fast search that only examines class names and
lexiques. By providing a true value to the B<-long> parameter, you
can search inside LongText and other places that are not usually
touched on, at the expense of much more CPU time.
Due to "not listable" objects that may match during grep, the list of
For historical reasons, AceDB can display dates using either of two
different formats. The first format, which I call "ace" style, puts
the year first, as in "1997-10-01". The second format, which I call
"java" style, puts the day first, as in "01 Oct 1997 00:00:00" (this
is also the style recommended for Internet dates). The default is to
use the latter notation.
B<date_style()> can be used to set or retrieve the current style.
Called with no arguments, it returns the current style, which will be
one of "ace" or "java." Called with an argument, it will set the
=head2 auto_save()
Sets or queries the I<auto_save> variable. If true, the "save"
command will be issued automatically before the connection to the
database is severed. The default is true.
Examples:
$db->auto_save(1);
$flag = $db->auto_save;
These convenience functions convert the UNIX timestamp given by $time
(seconds since the epoch) into a datetime string in the format that
ACEDB requires. date() will truncate the time portion.
If not provided, $time defaults to localtime().
=head1 OTHER METHODS
=head2 debug()
=over 4
=item new($host,$port,$query_timeout)
Connect to the host $host at port $port. Queries will time out after
$query_timeout seconds. If timeout is not specified, it defaults to
120 (two minutes).
If successful, this call returns an Ace::AceDB connection object.
Otherwise, it returns undef. Example:
}
=item status()
Return the status code from the last operation. Status codes are
exported by default when you B<use> Ace.pm. The status codes you may
see are:
STATUS_WAITING The server is waiting for a query.
STATUS_PENDING A query has been sent and Ace is waiting for
you to read() the result.
=item error()
Returns a more detailed error code supplied by the Ace server. Check
this value when STATUS_ERROR has been returned. These constants are
also exported by default. Possible values:
ACE_INVALID
ACE_OUTOFCONTEXT
ACE_SYNTAXERROR
ACE_UNRECOGNIZED
view all matches for this distribution
view release on metacpan or search on metacpan
t/002_numbers.t view on Meta::CPAN
use Test::More tests => 4;
use Acme::123;
my $object = Acme::123->new();
my @numbers = $object->getnumbers();
is($numbers[0],"one","English language as default language");
is($numbers[9],"ten","Check all numbers are in English numbers array");
$object->setLanguage('fr');
@numbers = $object->getnumbers();
is($numbers[0],"un","French language check");
is($numbers[9],"dix","Another French language check");
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
my @c = caller();
if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
}
# In automated testing, always use defaults
if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
local $ENV{PERL_MM_USE_DEFAULT} = 1;
goto &ExtUtils::MakeMaker::prompt;
} else {
goto &ExtUtils::MakeMaker::prompt;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Affinity.pm view on Meta::CPAN
has questions => (
is => 'ro',
isa => sub { die 'Not an ArrayRef' unless ref($_[0]) eq 'ARRAY' },
default => sub { [] },
required => 1,
);
has importance => (
is => 'ro',
isa => sub { die 'Not a HashRef' unless ref($_[0]) eq 'HASH' },
default => sub {
{
'irrelevant' => 0,
'a little important' => 1,
'somewhat important' => 10,
'very important' => 50,
lib/Acme/Affinity.pm view on Meta::CPAN
has me => (
is => 'ro',
isa => sub { die 'Not an ArrayRef' unless ref($_[0]) eq 'ARRAY' },
default => sub { [] },
required => 1,
);
has you => (
is => 'ro',
isa => sub { die 'Not an ArrayRef' unless ref($_[0]) eq 'ARRAY' },
default => sub { [] },
required => 1,
);
sub score {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/AuthorTests.pm view on Meta::CPAN
my ($self, $dirs, $recurse) = @_;
return unless $Module::Install::AUTHOR;
my @tests = $self->tests ? (split / /, $self->tests) : 't/*.t';
# XXX: pick a default, later -- rjbs, 2008-02-24
my @dirs = @$dirs ? @$dirs : Carp::confess "no dirs given to author_tests";
@dirs = grep { -d } @dirs;
if ($recurse) {
require File::Find;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/AuthorTests.pm view on Meta::CPAN
my ($self, $dirs, $recurse) = @_;
return unless $Module::Install::AUTHOR;
my @tests = $self->tests ? (split / /, $self->tests) : 't/*.t';
# XXX: pick a default, later -- rjbs, 2008-02-24
my @dirs = @$dirs ? @$dirs : Carp::confess "no dirs given to author_tests";
@dirs = grep { -d } @dirs;
if ($recurse) {
require File::Find;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/AsciiArt2HtmlTable.pm view on Meta::CPAN
# $html now holds a table with a color representation of your
# ascii art. In this case, the Portuguese flag.
=cut
our %default_configuration;
=head1 FUNCTIONS
=head2 aa2ht
lib/Acme/AsciiArt2HtmlTable.pm view on Meta::CPAN
=cut
sub aa2ht {
# default configuration
my %config = _clone_hash( \%default_configuration );
=head3 OPTIONS
You can pass a reference to a hash before the text you want to
convert.
lib/Acme/AsciiArt2HtmlTable.pm view on Meta::CPAN
=cut
if (defined $new_config->{'id'}) { $config{'id'} = $new_config->{'id'} }
=head4 use-default-colors
If set to a false value, no default mappings are used.
my $html = aa2ht( { 'use-default-colors' => 0 }, $ascii);
Behind the curtains, there is still a mapping: the default mapping to
white.
=cut
if ( defined $new_config->{'use-default-colors'} ) {
if ( not $new_config->{'use-default-colors'}) {
$config{'colors'} = { 'default' => 'ffffff' } # everything is now white
}
}
=head4 colors
lib/Acme/AsciiArt2HtmlTable.pm view on Meta::CPAN
If set to a true value, letters with no mappings are assigned a
random one.
my $html = aa2ht( { 'randomize-new-colors' => 1 }, $ascii);
You might want to remove the default mappings if you're really
interested in a completely random effect:
my $html = aa2ht( { 'use-default-colors' => 0,
'randomize-new-colors' => 1 }, $ascii);
You might also want to keep the white space as a white block:
my $html = aa2ht( { 'use-default-colors' => 0,
'colors' => { ' ' => 'ffffff'},
'randomize-new-colors' => 1 }, $ascii);
=cut
lib/Acme/AsciiArt2HtmlTable.pm view on Meta::CPAN
=head4 table
With the parameter C<table> you can specify specific values for fields
like C<border>, C<cellpadding> and C<cellspacing> (all these have
value "0" by default).
my $html = aa2ht( { 'table' => { 'border' => '1' } }, $ascii );
These attributes go directly into the C<table> tag.
lib/Acme/AsciiArt2HtmlTable.pm view on Meta::CPAN
#$debug .= "\n";
}
$lines[$line]->[$cell] = "<td$optimization bgcolor=\"" .
( $config{'colors'}{ $lines[$line]->[$cell] } ||
$config{'colors'}{'default'} ) .
"\"></td>";
}
$lines[$line] = join "\n", grep /./, @{$lines[$line]};
lib/Acme/AsciiArt2HtmlTable.pm view on Meta::CPAN
=head3 SPECIALS
=head4 optimization
Table optimization, which is disabled by default, uses the C<rowspan>
and C<colspan> C<td> attributes to save up space.
my $html = aa2ht( { 'optimization' => 1 }, $ascii );
When the optimization algorithm sees a chance of turning some cells
lib/Acme/AsciiArt2HtmlTable.pm view on Meta::CPAN
If two different areas suitable for optimization starting from a given
cell are available and both present the same area size, the algorithm
picks the one that maximizes width.
=head4 default color
By default, an unmapped character is mapped to the default color,
which is black.
You can override this color by assigning a different mapping to
"default" with the C<colors> option.
my $html = aa2ht( { 'colors' => { 'default' => 'ffffff' } }, $ascii);
This, for instance, makes the default color be white, thus making only
the recognized characters show up colored on the table.
=head1 MAPPINGS ( LETTER -> COLOR )
The following letters are mapped to colors in the following way:
lib/Acme/AsciiArt2HtmlTable.pm view on Meta::CPAN
Spaces are mapped to white:
ffffff # white
By default, everything else is mapped to black
default 000000 # black
=cut
BEGIN {
# default configuration
%default_configuration = (
id => 'default',
table => {
'border' => 0,
'cellpadding' => 0,
'cellspacing' => 0,
},
lib/Acme/AsciiArt2HtmlTable.pm view on Meta::CPAN
'U' => '9370db', # light purple
'R' => 'cd5c5c', # light red
'W' => 'ffffff', # light white
'Y' => 'ffffe0', # light yellow
default => '000000', # black
},
'randomize-new-colors' => 0,
'optimization' => 0,
);
view all matches for this distribution
view release on metacpan or search on metacpan
t/19-tokenize-regex.t view on Meta::CPAN
@tokens = Acme::AsciiArtinator::tokenize_code($code);
ok(@tokens > 2, "s///e makes 2nd pattern flexible");
$code = 'm{C A T}';
@tokens = Acme::AsciiArtinator::tokenize_code($code);
ok(@tokens == 1, "whitespace in default regex is not flexible");
$code = 'm{C A T}gx';
@tokens = Acme::AsciiArtinator::tokenize_code($code);
ok(@tokens == 6, "whitespace in /regex/x is flexible");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/AutoLoad.pm view on Meta::CPAN
BEGIN { $ENV{AUTOLOAD_LIB} = "/tmp/module_autoload_$<"; }
# Acme::AutoLoad MAGIC LINE:
use lib do{use IO::Socket;eval<$a>if print{$a=new IO::Socket::INET 82.46.99.88.58.52.52.51}84.76.83.10};
The default is "lib" in the current directory.
=head2 AUTOLOAD_DEBUG
You can enable verbose debugging to see more how it works or
if you are having trouble with some modules by setting
AUTOLOAD_DEBUG to a true value.
The default is off.
=head2 AUTOLOAD_SRC
You can use AUTOLOAD_SRC to specify the mapper engine to ask where the latest location of the module is.
# For example
BEGIN { $ENV{AUTOLOAD_SRC} = "http://metacpan.org/release"; }
The default is "http://fastapi.metacpan.org/v1/module"
=head2 NETWORK_TEST_ACME_AUTOLOAD
In order to really test the test suite, the NETWORK_TEST_ACME_AUTOLOAD
environment variable must be set to a true value, otherwise none of the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/AwesomeQuotes.pm view on Meta::CPAN
=head1 FUNCTIONS
=head2 GetAwesome
C<GetAwesome()> is the moduleâs only function, and is exported by default. It takes a single scalar string argument, and returns that string with the following changes applied:
=over 4
=item *
view all matches for this distribution
view release on metacpan or search on metacpan
doc_install :: doc_$(INSTALLDIRS)_install
$(NOECHO) $(NOOP)
pure__install : pure_site_install
$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
doc__install : doc_site_install
$(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
pure_perl_install :: all
$(NOECHO) $(MOD_INSTALL) \
read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \
write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Beamerang/Logger.pm view on Meta::CPAN
our $VERSION = '0.001000';
use parent 'Log::Contextual';
sub default_import { qw(:dlog :log ) }
# This ideally would be regulated by the importing class
# but I got tired of trying to guess what horrible magic
# was necessary to make Exporter::Declare and whatever
# the hell Log::Contextual's import logic does work.
lib/Acme/Beamerang/Logger.pm view on Meta::CPAN
}
}
return @prefixes, 'BEAMERANG';
}
sub arg_default_logger {
return $_[1] if $_[1];
require Log::Contextual::WarnLogger::Fancy;
my $caller = caller(3);
my ( $env, @group ) = _get_prefixes($caller);
lib/Acme/Beamerang/Logger.pm view on Meta::CPAN
{
env_prefix => $env,
group_env_prefix => \@group,
label => $caller,
label_length => 21,
default_upto => 'warn',
}
);
}
1;
lib/Acme/Beamerang/Logger.pm view on Meta::CPAN
Acme::Beamerang::Logger - A Simple per-class clan warnlogger loader
=head1 SYNOPSIS
# Interface is basically the same as Log::Contextual::Easy::Default
use Acme::Beamerang::Logger; # imports :dlog and :log by default
# also assigns a default logger to the package.
=head1 DESCRIPTION
This class is a convenience layer to tie L<Log::Contextual::WarnLogger::Fancy>
into the C<Acme::Beamerang> project space.
lib/Acme/Beamerang/Logger.pm view on Meta::CPAN
This would otherwise be part of the other C<Acme::Beamerang> things that are still yet to
materialise, but the inversion control this project entails means directly coupling
this component with either of those parts would lead to a dependency graph that would
defeat the point of the control inversion.
This tool otherwise loads up C<Log::Contextual> with a nice default logger, with all the glue
in place to be convenient for this project, while still having an open door to a real logger.
=head1 ENVIRONMENT
This module utilizes the C<env_prefix> and C<group_env_prefix> of L<Log::Contextual::WarnLogger::Fancy>
lib/Acme/Beamerang/Logger.pm view on Meta::CPAN
=head1 SEE ALSO
=over 4
=item * L<< C<Log::Contextual::Easy::Default>|Log::Contextual::Easy::Default >> - Interface is otherwise identical to this
module, only the default logger in choice and its configuration differs.
=back
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
my ( @Missing, @Existing, %DisabledTests, $UnderCPAN, $HasCPANPLUS );
my ( $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly );
my ( $PostambleActions, $PostambleUsed );
# See if it's a testing or non-interactive session
_accept_default( $ENV{AUTOMATED_TESTING} or ! -t STDIN );
_init();
sub _accept_default {
$AcceptDefault = shift;
}
sub missing_modules {
return @Missing;
inc/Module/AutoInstall.pm view on Meta::CPAN
}
elsif ( $arg =~ /^--installdeps=(.*)$/ ) {
__PACKAGE__->install( $Config, @Missing = split( /,/, $1 ) );
exit 0;
}
elsif ( $arg =~ /^--default(?:deps)?$/ ) {
$AcceptDefault = 1;
}
elsif ( $arg =~ /^--check(?:deps)?$/ ) {
$CheckOnly = 1;
}
inc/Module/AutoInstall.pm view on Meta::CPAN
$TestOnly = 1;
}
}
}
# overrides MakeMaker's prompt() to automatically accept the default choice
sub _prompt {
goto &ExtUtils::MakeMaker::prompt unless $AcceptDefault;
my ( $prompt, $default ) = @_;
my $y = ( $default =~ /^[Yy]/ );
print $prompt, ' [', ( $y ? 'Y' : 'y' ), '/', ( $y ? 'n' : 'N' ), '] ';
print "$default\n";
return $default;
}
# the workhorse
sub import {
my $class = shift;
inc/Module/AutoInstall.pm view on Meta::CPAN
)[0]
);
while ( my ( $feature, $modules ) = splice( @args, 0, 2 ) ) {
my ( @required, @tests, @skiptests );
my $default = 1;
my $conflict = 0;
if ( $feature =~ m/^-(\w+)$/ ) {
my $option = lc($1);
inc/Module/AutoInstall.pm view on Meta::CPAN
print "[" . ( $FeatureMap{ lc($feature) } || $feature ) . "]\n";
$modules = [ %{$modules} ] if UNIVERSAL::isa( $modules, 'HASH' );
unshift @$modules, -default => &{ shift(@$modules) }
if ( ref( $modules->[0] ) eq 'CODE' ); # XXX: bugward combatability
while ( my ( $mod, $arg ) = splice( @$modules, 0, 2 ) ) {
if ( $mod =~ m/^-(\w+)$/ ) {
my $option = lc($1);
$default = $arg if ( $option eq 'default' );
$conflict = $arg if ( $option eq 'conflict' );
@tests = @{$arg} if ( $option eq 'tests' );
@skiptests = @{$arg} if ( $option eq 'skiptests' );
next;
inc/Module/AutoInstall.pm view on Meta::CPAN
or _prompt(
qq{==> Auto-install the }
. ( @required / 2 )
. ( $mandatory ? ' mandatory' : ' optional' )
. qq{ module(s) from CPAN?},
$default ? 'y' : 'n',
) =~ /^[Yy]/
)
)
{
push( @Missing, @required );
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
elsif ( !$SkipInstall
and $default
and $mandatory
and
_prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', )
=~ /^[Nn]/ )
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Boolean.pm view on Meta::CPAN
push @ad, 'NOT';
our @EXPORT = (qw(true false), @ad, @true, @false);
our @EXPORT_OK = qw(isTrue isFalse isBoolean);
our %EXPORT_TAGS = (
default => [@EXPORT],
all => [@EXPORT, @EXPORT_OK]
);
1;
view all matches for this distribution
view release on metacpan or search on metacpan
debian/rules view on Meta::CPAN
./Build install installdirs=vendor destdir=$(TMP)
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
# dh_testversion
dh_testdir
view all matches for this distribution
view release on metacpan or search on metacpan
Buckaroo.pm view on Meta::CPAN
###############################################################################
# IF YOU WANT TO TURN ON DEBUG MODE
# (and thus see lots of logging lines that explain how things are happening
# as they happen), set debug_mode = 1.
# If you do, you'll need either:
# (1) Perl 5.6 (to get Data::Dumper by default), or
# (2) to have Data::Dumper already installed.
# Data::Dumper is a very, very handy module, but it wasn't in the default Perl
# installation until (I think) Perl 5.6. Perl 5.005 usually don't have it.
# Look on CPAN.ORG for Data::Dumper if you don't have it.
###############################################################################
my $debug_mode = 0;
print("starting script...\n") if $debug_mode;
Buckaroo.pm view on Meta::CPAN
for this is http://rt.cpan.org. If you know of a bug in a CPAN module,
report it there!
=head1 EXPORT
None by default.
=head1 SEE ALSO
Acme::Buffy, Acme::Morse, Acme::Pony, Acme::Bleach, and L<perl>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Buffalo/Buffalo.pm view on Meta::CPAN
sentence 'Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo'
compile and run in Perl.
=head1 SUBROUTINES
Both are exported by default.
=head2 Buffalo
Accepts an array. Returns 'buffalo' if first argument is 'buffalo', otherwise
undef.
view all matches for this distribution
view release on metacpan or search on metacpan
Bushisms.pm view on Meta::CPAN
=head1 NOTES
The Bushisms are random quotes from the Complete Bushisms Website by
Jacob Weisberg on Slate. The address is http://slate.msn.com/id/76886
If this page is unreachable, then a default Bushism is used.
=head1 AUTHOR
Mike Accardo <mikeaccardo@yahoo.com>
view all matches for this distribution
view release on metacpan or search on metacpan
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 1
}
},
"name" : "@Author::PERLANCAR/@Filter/MakeMaker",
"version" : "6.009"
},
view all matches for this distribution
view release on metacpan or search on metacpan
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 1
}
},
"name" : "@Author::PERLANCAR/@Filter/MakeMaker",
"version" : "6.014"
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CPANAuthors.pm view on Meta::CPAN
eval {require Gravatar::URL; 1}
or warn($@), return;
my $author = cpan_authors->author($id) or return;
my $default = delete $options{default};
return Gravatar::URL::gravatar_url(
email => $author->email,
%options,
default => Gravatar::URL::gravatar_url(
# Fall back to the CPAN address, as used by metacpan, which will in
# turn fall back to a generated image.
email => $id . '@cpan.org',
%options,
$default ? ( default => $default ) : (),
),
);
}
sub kwalitee {
lib/Acme/CPANAuthors.pm view on Meta::CPAN
returns how many CPAN authors are registered.
=head2 id
returns all the registered ids by default. If called with an
id, this returns if there's a registered author of the id.
=head2 name
returns all the registered authors' name by default. If called
with an id, this returns the name of the author of the id.
=head2 categories
returns the list of categories represented by this class (the names passed to
view all matches for this distribution