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
[@Author::Plicease]
:version = 2.72
release_tests = 1
installer = Author::Plicease::MakeMaker
github_user = PerlFFI
default_branch = main
test2_v0 = 1
workflow = static
workflow = linux
irc = irc://irc.perl.org/#native
version_plugin = PkgVersion::Block
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Colour/Fuzzy.pm view on Meta::CPAN
Acme::Colour::Fuzzy - give names to arbitrary RGB triplets
=head1 SYNOPSIS
# specify colour set, default is VACCC
my $fuzzy = Acme::Colour::Fuzzy->new( 'VACCC' );
# list of similar colours, sorted by similarity
my @approximations = $fuzzy->colour_approximations( $r, $g, $b, $count );
lib/Acme/Colour/Fuzzy.pm view on Meta::CPAN
my $fuzzy = Acme::Colour::Fuzzy->new( $colour_set );
Creates a new C<Acme::Colour::Fuzzy> object using the specified colour
set. The coolour set can be any backend for C<Graphic::ColorNames>
with 'VACCC' as default.
=cut
sub new {
my( $class, $scheme, $distance ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Colour.pm view on Meta::CPAN
unless ( exists $r{$colour} ) {
throw Error::Simple("Colour $colour is unknown");
}
$self->{colour} = $colour;
} else {
$self->{colour} = $self->default;
}
return $self;
}
sub default {
return "white";
}
sub colour {
my $self = shift;
lib/Acme/Colour.pm view on Meta::CPAN
The mix() method performs subtractive mixing on the colour. It takes
in the colour to mix in:
$c->mix("cyan");
=head2 default()
The default() method returns the default colour, white. You may
override this in a subclass.
$c = Acme::Colour->new(); # white by default
=head1 ALTERNATIVE INTERFACE
There is an alternative interface to this module which overloads
string quoting. This is very cute, but is not recommended in
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/Comment.pm view on Meta::CPAN
if(@_%2){
die "Incomplete set of arguments to $package\n"
}
### see if there are any arguments, if not, we default to the C comment style ###
if( keys %args ) {
### check if the user requested a certain type of comments ###
if( $args{type} ) {
lib/Acme/Comment.pm view on Meta::CPAN
? $args{one_line}
: 0;
}
### no arguments, Let's take the default C comment style ###
}
}
sub parse {
lib/Acme/Comment.pm view on Meta::CPAN
Both types of comments may only be preceded on a line by whitespace.
=head2 own_line
By default, C<own_line> is true, which means that multi-line comments may not
be followed by any characters other than whitespace on the same line.
This is the safest option if you think your code may contain the
comment characters (perhaps in a regex). If you disable it, other
characters are allowed on the line after the starting delimiter, but these
characters will be ignored. The closing delimiter cannot be followed by
lib/Acme/Comment.pm view on Meta::CPAN
If you wish to change this option, you must specify either a C<type> or
C<start> and C<end>.
=head2 one_line
By default, this is set to false, which means that multi-line comments
may not end on the same line in which they begin. Turning this on
allows the following syntax:
/* comment */
lib/Acme/Comment.pm view on Meta::CPAN
Single-line comments use either C<==> or C<-->.
=item * C
The default for Acme::Comment is C-style multi-line commenting
with C</*> and C<*/>. However, if you wish to change C<one_line>
or C<own_line>, you must explicitly specify the type.
=item * C++
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Constructor/Pythonic.pm view on Meta::CPAN
my ($name, $args, $globals) = @_;
# We want to be invisible to Carp
$Carp::Internal{$me} = 1;
# Process incoming arguments, providing sensible defaults.
my $module = $name;
my $class = defined($args->{class}) ? $args->{class} : $name;
my $ctor = defined($args->{constructor}) ? $args->{constructor} : 'new';
my $alias = defined($args->{alias}) ? $args->{alias} : $name;
my $req = exists($args->{no_require}) ? !$args->{no_require} : !$globals->{no_require};
# Doesn't really make sense to include a package name
# as part of the alias. We were just lazy in initializing
# the default above.
$alias = $1 if $alias =~ /::(\w+)\z/;
# We really only need Module::Runtime if $req is on.
# $req is on by default, but in imagined case where
# the caller has been diligent enough to no_require
# every import, we can do them a favour and not
# needlessly load Module::Runtime into memory.
if ($req) { require Module::Runtime }
lib/Acme/Constructor/Pythonic.pm view on Meta::CPAN
=item *
B<class>
The class to call the constructor on. This is normally the same as the module
name, and that's the default assumption, so there's no usually much point in
providing it.
=item *
B<constructor>
The method name for the constructor. The default is C<new> which is usually
correct.
=item *
B<alias>
The name of the function you want created for you. The default is the last
component of the module name, which is often sensible.
=item *
B<no_require>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/IO/Scalar.pm view on Meta::CPAN
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = bless \do { local *FH }, $class;
tie *$self, $class, $self;
$self->open(@_); ### open on anonymous by default
$self;
}
sub DESTROY {
shift->close;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CorpusScrambler.pm view on Meta::CPAN
=head2 scramble( @keyword )
Generate a piece of lipsum text accroding to @keyword. If you didn't
feed any corpus before with feed() method, it will use
Text::Greeking::zh_TW's default corpus.
=cut
sub scramble {
my ($self, @keyword) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
use Acme::Cow::TextBalloon;
use IO::File;
use Text::Template;
$Acme::Cow::default_cow = <<'EOC';
{$balloon}
{$tl} ^__^
{$tl} ({$el}{$er})\_______
(__)\ )\/\
{$U} ||----w |
=pod
=head2 print
Print a representation of the cow to the specified filehandle
(STDOUT by default).
=over 4
=item Parameters
=pod
=head2 fill
Inform the cow to fill and adjust (or not) the text inside its balloon.
By default, text inside the balloon is filled and adjusted.
=over 4
=item Parameters
my $tmpl = shift;
if (not $tmpl) {
if (defined $self->{'File'}) {
$tmpl = _slurp_file($self->{'File'});
} else {
$tmpl = $Acme::Cow::default_cow;
}
}
my $b = $self->_create_balloon();
my $template = new Text::Template(TYPE => 'STRING', SOURCE => $tmpl);
chomp($Acme::Cow::_private::balloon = $b->as_string());
{$balloon} is the text balloon; it should be on a line by itself,
flush-left. {$tl} and {$tr} are what goes to the text balloon from
the thinking/speaking part of the picture; {$tl} is a backslash
("\") for speech, while {$tr} is a slash ("/"); both are a lowercase
letter O ("o") for thought. {$el} is a left eye, and {$er} is a
right eye; both are "o" by default. Finally {$U} is a tongue,
because a capital U looks like a tongue. (Its default value is "U ".)
Escape all other curly-braces within the ASCII art with backslashes.
There are two methods to make your own cow file: the standalone
file and the Perl module.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/CreatingCPANModules.pm view on Meta::CPAN
again, up to you. I always put the same documentation from the main
module, some people just put a template README in all their
distributions.
Whatever you do, don't forget to update the README at least once, as
it's the file many users look at and the default documentation can be
kind of... embarassing ;-)
[slide] And now we finally have our module!
The module is comprised of two things: code and documentation.
lib/Acme/CreatingCPANModules.pm view on Meta::CPAN
Currently, through C<Test::More>, it checks to see if the module loads
correctly. It also diagnoses what it's doing.
[slide] Then we have another test file, which was recently introduced,
to check if files like README and Changes have content written by you
or are just the default templates.
[slide] The next one is checks if you're documenting all your public
functions. It assumes that if you have a private function (that is, a
function that's not meant for the public but rather to be used by your
other functions) you will name it something commencing with an
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Currency.pm view on Meta::CPAN
This module uses a source filter to replace every occurrance of a given string
in the source code with the $-sigil. That means using the @ in place of the
Yen symbol should yield interesting arrays. (Or none at that.)
By default, using Acme::Currency will use the character as the scalar sigil.
=head2 EXPORT
None by default.
=head1 SEE ALSO
L<Filter::Simple>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Curses/Marquee/Extensions.pm view on Meta::CPAN
Location of the origin's ordinate. Defaults to (winh - fontHeight)/2
i.e; vertically centered.
=item font
Figfont to use, defaults to standard.
This also accepts an arrayref, which can be a list of fonts to rotate through.
If cycling fonts, the last element of the arrayref may be a number indicating
the number of seconds between transitions. Otherwise, this occurs every 45 sec.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Curses/Marquee.pm view on Meta::CPAN
C<window> should be a curses window that the marquee can write
to. C<height> and C<width> should be the height and width of that
window, in characters.
There are also two optional arguments: C<font>, which sets the figlet
font of the marquee (defaults to the figlet default, 'standard'), and
C<text> which will set an initial string to be displayed and cause the
marquee to start display as soon as it is created.
=cut
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/Daily/Fail.pm view on Meta::CPAN
=over
=item C<get_headline>
Not exported by default, takes no parameters, returns a randomly generated headline.
=back
=head1 BASED ON
view all matches for this distribution
view release on metacpan or search on metacpan
reference.
=head2 EXPORT
By default, B<Acme::Damn> exports the method B<damn()> into the current
namespace. Aliases for B<damn()> (see below) may be imported upon request.
=head2 Methods
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Data/Dumper/Extensions.pm view on Meta::CPAN
sub DD_Defaults {
{ %$DD_Defaults }
}
our $_new_with_defaults = sub {
my ( $self, $user_defaults ) = @_;
my $instance = $self->new( [] );
# Initialise with system defaults
my $instance_defaults = { %{$DD_Defaults} };
# Validate and overwrite user defaults
for my $key ( sort keys %{ $user_defaults || {} } ) {
if ( not exists $DD_Defaults->{$key} ) {
my $guesskey = ucfirst( lc($key) );
my $dym =
exists $DD_Defaults->{$guesskey}
? sprintf q[ (did you mean '%s'?)], $guesskey
: q[];
die sprintf "Unknown feature '%s'%s", $key, $dym;
}
$instance_defaults->{$key} = $user_defaults->{$key};
}
# Set all values
for my $key ( sort keys %{$instance_defaults} ) {
# Properties that aren't methods are bad?
my $sub = $instance->can($key);
die "No setter for feature '$key'" unless $sub;
$instance->$sub( $instance_defaults->{$key} );
}
return $instance;
};
our $_DumpValues = sub {
lib/Acme/Data/Dumper/Extensions.pm view on Meta::CPAN
$self->Reset()->Names( [] )->Values( [] );
return wantarray ? @out : join q[], @out;
};
our @EXPORT_OK = qw( $_new_with_defaults $_DumpValues );
BEGIN { *import = \&Exporter::import; }
1;
lib/Acme/Data/Dumper/Extensions.pm view on Meta::CPAN
Acme::Data::Dumper::Extensions - Experimental Enhancements to core Data::Dumper
=head1 SYNOPSIS
use Data::Dumper;
use Acme::Data::Dumper::Extensions qw/$_new_with_defaults/;
local $Data::Dumper::Indent = 5;
my $instance = Data::Dumper->$_new_with_defaults({ }); # Indent is still 2!
$instance = Data::Dumper->$_new_with_defaults({
Indent => 4, # Easier initalizer
});
=head1 DESCRIPTION
lib/Acme/Data/Dumper/Extensions.pm view on Meta::CPAN
For some, it will serve more as a proof-of-concept for various interfaces until
they get accepted into core.
=head1 EXPORTS
=head2 C<$_new_with_defaults>
This is a prototype function for construcing a Data::Dumper instance without
being prone to leak from other people using the global values.
At the time of this writing, if you need perfect consistency from Data::Dumper
in widely used code, you by necessity have to know every version of
Data::Dumper that exists, and know what the default values are of various
arguments, in order to revert them to your "known good" state if 3rd party
code decides to locally change those values for their own purposes.
Getting an instance of a Data::Dumper object before anyone tweaks those values
would also work, but trying to bet on getting loaded and getting an instance
lib/Acme/Data/Dumper/Extensions.pm view on Meta::CPAN
Data::Dumper can lend itself to a memory leak and you have to take additional
care to make sure you free values passed to it.
=head3 Syntax
The name used here is C<$_new_with_defaults> as this makes it straight forward
to migrate code that uses this once its adopted, without needing to
monkey-patch Data::Dumper itself.
Data::Dumper->$_new_with_defaults( ... )
Data::Dumper->new_with_defaults( ... )
=head3 Arguments
# Using the defaults
Data::Dumper->$_new_with_defaults()
# Augmenting the defaults
Data::Dumper->$_new_with_defaults({ Name => value, Name => value });
The approach I've taken here is to ignore the standard arguments to C<new>,
because it wasn't clear to me how else to organise this with the existing
alternative interfaces.
Given there's an alternative way of passing the dump values, its suggested
to just use those until this part of the design is sorted out:
Data::Dumper->$_new_with_defaults()->Values([ stuff, to, dump ])->Dump();
Or use the other feature suggested in this module:
Data::Dumper->$_new_with_defaults()->$_DumpValues([ stuff, to, dump ]);
=head3 Unrecognised Features
I'm still not sure how to handle what happens when somebody passes the name
of a feature which doesn't exist yet, but does in a future version.
Ideally, calling C<$_new_with_defaults()> should give you the same results in
perpetuity ( or at least, from the date this feature gets added )
For now I think the best thing to do is die fatally if a feature that is
requested can't be provided, as that will produce output other than is desired
and violate output consistency as a result.
This will just become a nightmare if somebody ever changes "The Default" for
a I<new> feature wherein, users have to I<< Opt-B<Out> >>, causing an
explosion on older versions where that feature didn't exist.
This should be a hazard to never even consider changing the default behaviour.
=head2 C<$_DumpValues>
This function is a helper that does what people who maintain a long-lived
C<Data::Dumper> instance generally desire: The ability to just set up an
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/DependOnEverything.pm view on Meta::CPAN
use Bundle::Net::Radius::Server;
use Bundle::Net::SNMP::Mixin;
use Bundle::NiceSleep;
use Bundle::OpenInteract;
use Bundle::OpenXPKI;
use Bundle::OS_default;
use Bundle::Ovid;
use Bundle::Padre::Plugin;
use Bundle::PBib;
use Bundle::Perl;
use Bundle::perlWebSite;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Dice.pm view on Meta::CPAN
@EXPORT_OK = qw( roll_dice roll_craps );
}
$Acme::Dice::VERSION = '1.01';
my $defaults = {
dice => 1,
sides => 6,
favor => 0,
bias => 20,
};
lib/Acme/Dice.pm view on Meta::CPAN
my $raw_args = @_ == 1 ? shift : {@_};
my $args = {};
my @errors;
# put put defaults in place for missing params
# and detect incoming undefined params
for ( keys( %{$defaults} ) ) {
$raw_args->{$_} = $defaults->{$_} if !exists( $raw_args->{$_} );
push( @errors, "param present but undefined: $_" )
unless defined $raw_args->{$_};
$args->{$_} = delete( $raw_args->{$_} );
push( @errors, "$_ must be a non-negative integer: $args->{$_}" )
if defined( $args->{$_} ) && $args->{$_} !~ m/^\d+$/;
lib/Acme/Dice.pm view on Meta::CPAN
individual die results returned, but one can exert some amount of influence
over the outcome as well!
=head1 FUNCTIONS
Nothing is C<EXPORT>ed by default, However, the following functions are
available as imports.
=head2 roll_dice
This is the primary function. It accepts the parameters listed below to
lib/Acme/Dice.pm view on Meta::CPAN
The C<bias> parameter behaves the same as described above for C<roll_dice>.
Any other parameters, including those that are otherwise legal for
C<roll_dice>, will cause an exception to be thrown.
The default is an un-biased roll of two 6-sided dice.
=head1 BUGS
Bugs? In an Acme module?!? Yeah, right.
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" : 9
}
},
"name" : "@Author::ETHER/MakeMaker",
"version" : "5.039"
},
},
{
"class" : "Dist::Zilla::Plugin::RunExtraTests",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 9
}
},
"name" : "@Author::ETHER/RunExtraTests",
"version" : "0.028"
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/DoOrDie.pm view on Meta::CPAN
(The L<autodie> module can't help you since it doesn't support the
C<do> function.)
This module provides the replacement function C<do_or_die> that reports
any error by throwing an exception. The same function is also available
under the alias C<do> (not exported by default).
=head1 EXPORTS
=over
=item By default:
=over
=item do_or_die
view all matches for this distribution
view release on metacpan or search on metacpan
version: '5.034'
-
class: Dist::Zilla::Plugin::MakeMaker
config:
Dist::Zilla::Role::TestRunner:
default_jobs: 1
name: '@Author::ZOFFIX/MakeMaker'
version: '5.034'
-
class: Dist::Zilla::Plugin::Manifest
name: '@Author::ZOFFIX/Manifest'
view all matches for this distribution
view release on metacpan or search on metacpan
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"config" : {
"Dist::Zilla::Role::TestRunner" : {
"default_jobs" : 1
}
},
"name" : "@DROLSKY/MakeMaker",
"version" : "5.037"
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ELLEDNERA/Utils.pm view on Meta::CPAN
@ori_nums = (1, 3, 5, 7, 9, 11, 13, 15);
@shuffled = shuffle(@ori_nums);
=head1 EXPORT
None by default
=head1 SUBROUTINES
=head2 sum( LIST )
view all matches for this distribution
view release on metacpan or search on metacpan
bin/eva-titlenize view on Meta::CPAN
use warnings;
use utf8;
use Acme::EvaTitlenize;
use Encode;
use Getopt::Long qw(:config posix_default no_ignore_case gnu_compat);
my $upper_right;
Getopt::Long::GetOptions(
'u' => \$upper_right,
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
demo/sightly.pl view on Meta::CPAN
This creates eyesore, a sightly-encoded file.
To decode it: perl eyesore > f.tmp
To check it worked: cmp f.tmp some_binary_file
Notes:
If no shape is specified, a single (very long) line will be output.
If a shape, but no file, is specified, a default no-op filler will
be used to fill the shape.
EOM
exit 1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
=item I<namespace>
(scalar or object(!) B<ref>)
Sets a context for various parts of I<{fsm}> and services would be resolved.
No defaults.
Refer to L<B<query()> method|/query()> documentation for details.
=item I<source>
(scalar or C<CODE>)
be in fact queried through L<B<fst()> method|/fst()> turn map needs bit more
sophisticated handling;
and that's what B<turn()> does;
in fact asking for C<turns> will result in B<croak>.
I<$action> of C<START> and C<CONTINUE> special states suffer implicit
defaulting to empty string.
=item anything else
No arguments or more then two is an non-fatal error.
Returns C<undef> (with B<carp>).
defined $self->{_}{namespace} or croak
qq|[$caller]: {namespace} !isa defined|;
my $anchor = $self->{_}{namespace};
my $backup = $topic;
if( ref $anchor eq '' && $anchor eq '' ) {
$self->diag( 5, q|[%s]: defaulting %s to $self|, $caller, $manifest );
$anchor = $self }
$self->diag( 5, q|[%s]: {namespace} isa (%s)|, $caller, ref $anchor );
unless( ref $anchor eq '' ) {
$self->diag( 5, q|[%s]: going for <%s>->[%s]|,
$caller, ref $anchor, $topic );
sub query_dumper {
my $self = shift @_;
return $self->verify(
$self->query(
# TODO:202202210258:whynot: This is inefficient, defaulting should happen in B<connect()> instead.
$self->{_}{dumper} // sub { sprintf q|(%s)|, $_[1] // q|undef| },
q|{dumper}|, @_ ) // q|(unclear)|,
# XXX:202202210304:whynot: 'source' looks like remnants of refactoring. Should investigate it deeper.
$self->state, qw| source source |, '' ) }
=item Default For Turn Map
B<(missing feature)>
It's not hard to imagine application of rather limited turn map that should
default on anything else deemed irrelevant.
Right now to achieve logic like this such defaulting ought to be merged into
B<switch()>.
That's insane.
=item Diagnostics
=item C<[query]: [query_switch]: {namespace} isa (%s)>
B<(deep trace)>, L<B<query()> method|/query()>.
C<ref $namespace> is I<%s>.
=item C<[query]: [query_dumper]: defaulting %s to $self>
=item C<[query]: [query_source]: defaulting %s to $self>
=item C<[query]: [query_switch]: defaulting %s to $self>
B<(deep trace)>, L<B<query()> method|/query()>.
I<$namespace> is an empty string.
The blackboard object will be used to resolve the callback.
}
}
Again, B<source()> supposedly produces some numbers.
Then some kind of FizBuzz happens.
Also, returning C<undef> as default raises questions.
However, it's acceptable for example.
Now, quick demonstration, that's how this FizzBuzz would look
using B<DMA::FSM> capabilities (and B<A::F> of I<v2.2.7> syntax).
view all matches for this distribution