Result:
found more than 590 distributions - search limited to the first 2001 files matching your query ( run in 1.598 )


Acme-InputRecordSeparatorIsRegexp

 view release on metacpan or  search on metacpan

lib/Acme/InputRecordSeparatorIsRegexp.pm  view on Meta::CPAN

just looking for autochomp functionality and don't care about
applying regular expressions to determine line endings, this
function provides an (inefficient) way to do that to
arbitrary file handles.

The default attribute value is false.

=head2 binmode FILEHANDLE, LAYER

Overrides Perl's builtin L<binmode|perlfunc/"binmode"> function. 
If the I<pseudo-layer> C<:irs(...)> is specified, then apply the 

 view all matches for this distribution


Acme-Insult-Evil

 view release on metacpan or  search on metacpan

lib/Acme/Insult/Evil.pm  view on Meta::CPAN

    #
    use overload '""' => sub ( $s, $u, $b ) { $s->{insult} // () };
    #
    sub _http (%params) {
        state $http
            //= HTTP::Tiny->new( default_headers => { Accept => 'application/json' }, agent => sprintf '%s/%.2f ', __PACKAGE__, our $VERSION );
        state $api //= URI->new('https://evilinsult.com/generate_insult.php');

        # API accepts languages as a param named 'lang' but returns the language in a field called 'language'... why?
        $api->query_form( type => 'json', ( defined $params{language} ? ( lang => delete $params{language} ) : () ), %params );
        my $res = $http->get($api);    # {success} is true even when advice is not found but we'll at least know when we have valid JSON

lib/Acme/Insult/Evil.pm  view on Meta::CPAN


=over

=item C<language>

Insult's language. The default is C<en>. Supported languages include: C<en>, C<fr>, C<cn>, C<ja>, C<es>, etc.

=back

On success, an insult is returned as a blessed hash reference containing the following data:

 view all matches for this distribution


Acme-Insult-Glax

 view release on metacpan or  search on metacpan

lib/Acme/Insult/Glax.pm  view on Meta::CPAN

    use overload '""' => sub ( $s, $u, $b ) { $s->{insult} // () };
    my $api = URI->new('https://insult.mattbas.org/api/');
    #
    sub _http ( $endpoint, %params ) {
        state $http
            //= HTTP::Tiny->new( default_headers => { Accept => 'application/json' }, agent => sprintf '%s/%.2f ', __PACKAGE__, our $VERSION );
        ( my $hey = $api->clone )->path( '/api/' . $endpoint . '.json' );
        $hey->query_form(%params);
        my $res = $http->get( $hey->as_string );    # {success} is true even when advice is not found but we'll at least know when we have valid JSON
        $res->{success} ? decode_json( $res->{content} ) : ();
    }

lib/Acme/Insult/Glax.pm  view on Meta::CPAN


=over

=item C<en>

Plain English. This is the default.

=item C<en_corporate>

English with corporate jargon inserted. Perfect for the 4:50p work email.

lib/Acme/Insult/Glax.pm  view on Meta::CPAN


=item C<template>

Insult template.

The default value is different depending on the parameters passed to the API:

=over

=item C<lang =E<gt> 'en'>

lib/Acme/Insult/Glax.pm  view on Meta::CPAN


=over

=item C<en>

Plain English. This is the default.

=item C<en_corporate>

English with corporate jargon inserted.

 view all matches for this distribution


Acme-Insult-Pirate

 view release on metacpan or  search on metacpan

lib/Acme/Insult/Pirate.pm  view on Meta::CPAN

    #
    use overload '""' => sub ( $s, $u, $b ) { $s->{insult} // () };
    #
    sub _http (%params) {
        state $http
            //= HTTP::Tiny->new( default_headers => { Accept => 'application/json' }, agent => sprintf '%s/%.2f ', __PACKAGE__, our $VERSION );
        state $api //= URI->new('https://pirate.monkeyness.com/api/insult');

        #~ $api->query_form( %params );
        my $res = $http->get($api);    # {success} is true even when advice is not found but we'll at least know when we have valid JSON

 view all matches for this distribution


Acme-Intraweb

 view release on metacpan or  search on metacpan

Makefile  view on Meta::CPAN

CCCDLFLAGS =  
CCDLFLAGS =  
DLEXT = dll
DLSRC = dl_win32.xs
LD = link
LDDLFLAGS = -dll -nologo -nodefaultlib -release  -libpath:"C:\Perl\lib\CORE"  -machine:x86
LDFLAGS = -nologo -nodefaultlib -release  -libpath:"C:\Perl\lib\CORE"  -machine:x86
LIBC = msvcrt.lib
LIB_EXT = .lib
OBJ_EXT = .obj
OSNAME = MSWin32
OSVERS = 4.0

Makefile  view on Meta::CPAN

install_perl :: all pure_perl_install doc_perl_install

install_site :: all pure_site_install doc_site_install

install_ :: install_site
	@echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site

pure_install :: pure_$(INSTALLDIRS)_install

doc_install :: doc_$(INSTALLDIRS)_install
	@echo Appending installation info to $(INSTALLARCHLIB)/perllocal.pod

pure__install : pure_site_install
	@echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site

doc__install : doc_site_install
	@echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site

pure_perl_install ::
	@$(MOD_INSTALL) \
		read $(PERL_ARCHLIB)\auto\$(FULLEXT)\.packlist \
		write $(INSTALLARCHLIB)\auto\$(FULLEXT)\.packlist \

 view all matches for this distribution


Acme-JWT

 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


Acme-JavaTrace

 view release on metacpan or  search on metacpan

lib/Acme/JavaTrace.pm  view on Meta::CPAN

=over 4

=item C<showrefs>

Using this option will tell C<Devel::SimpleTrace> to stringify objects and 
references passed in argument to C<die()>. This option is disabled by default 
in order to leave objects and references untouched. 

=back


 view all matches for this distribution


Acme-Jungle-CrawlerExample

 view release on metacpan or  search on metacpan

lib/Acme/Jungle/CrawlerExample.pm  view on Meta::CPAN

our $VERSION     = '0.01';

has spider => (
    is => 'ro',
    isa => 'Jungle',
    default => sub { 
        return Jungle->new;
    },
); 


 view all matches for this distribution


Acme-KeyboardMarathon

 view release on metacpan or  search on metacpan

marathon.pl  view on Meta::CPAN

the command line as arguments and it returns the total distance.

  $> ./marathon.pl foo.txt bar.txt baz.txt

The first argument may be --qwerty or --dvorak, to specify the keyboard
layout. It defaults to QWERTY.

=cut

use Acme::KeyboardMarathon;
use Math::BigInt lib => 'GMP';

 view all matches for this distribution


Acme-KnowledgeWisdom

 view release on metacpan or  search on metacpan

lib/Acme/KnowledgeWisdom.pm  view on Meta::CPAN

our $VERSION = '0.01';

use Moose;
use warnings FATAL => 'all';

has 'in_questions' => ( isa => 'Bool', is => 'ro', default => 1);
has 'has_already'  => ( isa => 'Bool', is => 'ro', default => 0);

sub get {
    my $kw = shift;
    
    return $kw->ask

lib/Acme/KnowledgeWisdom.pm  view on Meta::CPAN


=head1 ACCESSORS

=head2 in_questions

Boolean, default value is true.

=head2 has_already

Boolean, default value is false.

=head1 METHODS

=head2 get

 view all matches for this distribution


Acme-Lambda-Expr

 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


Acme-Lambda

 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


Acme-LastWords

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         },
         {
            "class" : "Dist::Zilla::Plugin::MakeMaker",
            "config" : {
               "Dist::Zilla::Role::TestRunner" : {
                  "default_jobs" : 1
               }
            },
            "name" : "@Author::PERLANCAR/@Filter/MakeMaker",
            "version" : "6.008"
         },

 view all matches for this distribution


Acme-Laugh

 view release on metacpan or  search on metacpan

lib/Acme/Laugh.pm  view on Meta::CPAN

The input parameter forces the inclusion of the first letter, for reasons
too difficult to explain here.

=item continuum( $chunks );

Returns the join of a $chunks number of elements, where $chunks defaults
to 1 + rand 4;

=item capitals( $laugh );

Returns the input $laugh where some of the letters are capitalised in

 view all matches for this distribution


Acme-Lelek

 view release on metacpan or  search on metacpan

lib/Acme/Lelek.pm  view on Meta::CPAN

const my %octals => map { $leks[$_] => $_ } 0 .. 7;

has base8 => (
    is       => 'ro',
    required => 1,
    default  => sub {
        Convert::BaseN->new( base => 8 );
    }
);

sub encode {

 view all matches for this distribution


Acme-Letter

 view release on metacpan or  search on metacpan

lib/Acme/Letter.pm  view on Meta::CPAN


require Exporter;

our @ISA = qw(Exporter);

# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.

# This allows declaration	use Acme::Letter ':all';
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
# will save memory.

 view all matches for this distribution


Acme-Lexical-Thief

 view release on metacpan or  search on metacpan

lib/Acme/Lexical/Thief.pm  view on Meta::CPAN

      my $name;   # don't do this!
      steal $name;
      say "Hello $name";
   }

By default, this module steals from your I<immediate> caller. You can
thieve higher up the call stack using:

   steal 0 ($car);  # caller's $car
   steal 1 @boats;  # caller's caller's @boats
   steal 2 %stash;  # caller's caller's caller's @stash

 view all matches for this distribution


Acme-Lingua-EN-Inflect-Modern

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         },
         {
            "class" : "Dist::Zilla::Plugin::MakeMaker",
            "config" : {
               "Dist::Zilla::Role::TestRunner" : {
                  "default_jobs" : 9
               }
            },
            "name" : "@RJBS/MakeMaker",
            "version" : "6.029"
         },

 view all matches for this distribution


Acme-Lingua-ZH-Remix

 view release on metacpan or  search on metacpan

lib/Acme/Lingua/ZH/Remix.pm  view on Meta::CPAN

The C<random_sentence> method returns a string of one sentence
of Chinese like:

    真是完全失敗,孩子!怎麼不動了呢?

By default, it uses small corpus data from Project Gutenberg. The generated
sentences are remixes of the corpus.

You can feed you own corpus data to the `feed` method:

    my $x = Acme::Lingua::ZH::Remix->new;

lib/Acme/Lingua/ZH/Remix.pm  view on Meta::CPAN


Both min and max values are required to be integers greater or equal to
zero. The value of max should be greater then the value of min. If any of these
values are invalidate, it is treated as if they are not passed.

The default values of min, max are 0 and 140, respectively.

The implementation random algorthm based, thus it needs indefinite time to
generate the result. If it takes more then 1000 iterations, it aborts and return
the results anyway, regardless the length constraint. This can happen when the
lengths of phrases from corpus do no adds up to a value within the given range.

 view all matches for this distribution


Acme-Locals

 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


Acme-LookOfDisapproval

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

         },
         {
            "class" : "Dist::Zilla::Plugin::ModuleBuildTiny",
            "config" : {
               "Dist::Zilla::Role::TestRunner" : {
                  "default_jobs" : 9
               }
            },
            "name" : "@Author::ETHER/ModuleBuildTiny",
            "version" : "0.017"
         },

META.json  view on Meta::CPAN

         },
         {
            "class" : "Dist::Zilla::Plugin::RunExtraTests",
            "config" : {
               "Dist::Zilla::Role::TestRunner" : {
                  "default_jobs" : 9
               }
            },
            "name" : "@Author::ETHER/RunExtraTests",
            "version" : "0.029"
         },

 view all matches for this distribution


Acme-Loopy

 view release on metacpan or  search on metacpan

CONTRIBUTING  view on Meta::CPAN

        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.)

    *   Documentation

        If there's anything unclear in the documentation, please submit this
        as a bug report or patch as above.

 view all matches for this distribution


Acme-Lou

 view release on metacpan or  search on metacpan

lib/Acme/Lou.pm  view on Meta::CPAN


=over 4

=item * lou_rate

Percentage of translating. 100(default) means full, 0 means do nothing.

=back

=head1 EXPORTS

No exports by default.

=head2 lou

    use Acme::Lou qw/lou/;

 view all matches for this distribution


Acme-MITHALDU-BleedingOpenGL

 view release on metacpan or  search on metacpan

BleedingOpenGL.pm  view on Meta::CPAN

   TrueColor
   DirectColor
);


# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.

@oldfunctions = qw(
	glpOpenWindow
	glpMainLoop

BleedingOpenGL.pm  view on Meta::CPAN

*OpenGL::Matrix::CLONE_SKIP = sub { 1 };  # OpenGL::Matrix is not thread safe

# The following material is directly copied from Stan Melax's original OpenGL-0.4
# (with modifications for OS/2).

%window_defaults=(
   'x'         => 0,
   'y'         => 0,
   'width'     => 500,
   'height'    => 500,
   'parent'    => 0,

BleedingOpenGL.pm  view on Meta::CPAN

   'attributes'=> [],
);


sub glpOpenWindow {
        # default values
        my(%a) = @_;
        my(%p) = %window_defaults;
        foreach $k (keys(%a)){
                exists($p{$k}) || warn "Not a valid parameter to glpOpenWindow: `$k'\n";
                #print "parameter $k now ",$a{$k}," was ",$p{$k},"\n";  
                $p{$k} = $a{$k};
        }

 view all matches for this distribution


Acme-MITHALDU-XSGrabBag

 view release on metacpan or  search on metacpan

inc/Inline.pm  view on Meta::CPAN

   NOWARN =>       [WARNINGS => 0],
   _INSTALL_ =>    [_INSTALL_ => 1],
   SITE_INSTALL => undef,  # No longer supported.
  );

my $default_config =
  {
   NAME => '',
   AUTONAME => -1,
   VERSION => '',
   DIRECTORY => '',

inc/Inline.pm  view on Meta::CPAN

    if ($class ne 'Inline') {
        croak M01_usage_use($class) if $class =~ /^Inline::/;
        croak M02_usage();
    }

    $CONFIG{$pkg}{template} ||= $default_config;

    return unless @_;
    &create_config_file(), return 1 if $_[0] eq '_CONFIG_';
    goto &maker_utils if $_[0] =~ /^(install|makedist|makeppd)$/i;

inc/Inline.pm  view on Meta::CPAN

    my $o;
    my ($pkg, $script) = caller;
    my $class = shift;
    croak M03_usage_bind() unless $class eq 'Inline';

    $CONFIG{$pkg}{template} ||= $default_config;

    my $language_id = shift or croak M03_usage_bind();
    croak M03_usage_bind()
      unless ($language_id =~ /^\S+$/ and $language_id !~ /\n/);
    $code = shift or croak M03_usage_bind();

inc/Inline.pm  view on Meta::CPAN

sub check_config {
    my $o = shift;
    my @others;
    while (@_) {
        my ($key, $value) = (shift, shift);
        if (defined $default_config->{$key}) {
            if ($key =~ /^(WITH|USING)$/) {
                croak M10_usage_WITH_USING()
                  if (ref $value and ref $value ne 'ARRAY');
                $value = [$value] unless ref $value;
                $o->{CONFIG}{$key} = $value;

inc/Inline.pm  view on Meta::CPAN

    }
    return (@others);
}

#==============================================================================
# Set option defaults based on current option settings.
#==============================================================================
sub fold_options {
    my $o = shift;

# The following small section of code seems, to me, to be unnecessary - which is the

inc/Inline.pm  view on Meta::CPAN

        croak M02_usage() if $key =~ /[\s\n]/;
        if ($key =~ /^(ENABLE|DISABLE)$/) {
            ($key, $value) = (uc $value, $key eq 'ENABLE' ? 1 : 0);
        }
        croak M47_invalid_config_option($key)
          unless defined $default_config->{$key};
        $CONFIG{$pkg}{template}{$key} = $value;
    }
}

#==============================================================================

 view all matches for this distribution


Acme-MUDLike

 view release on metacpan or  search on metacpan

lib/Acme/MUDLike.pm  view on Meta::CPAN

		    prop = jQuery.browser.msie ? "styleFloat" : "cssFloat";

		if (!force && elem.style[prop])
			ret = elem.style[prop];

		else if (document.defaultView && document.defaultView.getComputedStyle) {

			if (prop == "cssFloat" || prop == "styleFloat")
				prop = "float";

			prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
			var cur = document.defaultView.getComputedStyle(elem, null);

			if ( cur )
				ret = cur.getPropertyValue(prop);
			else if ( prop == "display" )
				ret = "none";
			else
				jQuery.swap(elem, { display: "block" }, function() {
				    var c = document.defaultView.getComputedStyle(this, "");
				    ret = c && c.getPropertyValue(prop) || "";
				});

		} else if (elem.currentStyle) {

lib/Acme/MUDLike.pm  view on Meta::CPAN

				var p = n / options.duration;
				
				// If the easing function exists, then use it 
				z.now = options.easing && jQuery.easing[options.easing] ?
					jQuery.easing[options.easing](p, n,  firstNum, (lastNum-firstNum), options.duration) :
					// else use default linear easing
					((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum;

				// Perform the next step of the animation
				z.a();
			}

 view all matches for this distribution


Acme-Machi

 view release on metacpan or  search on metacpan

lib/Acme/Machi.pm  view on Meta::CPAN

    unshift (@{$_[0]{Words}}, @_[1 .. $#_]);
  }
       
=head2 affectionate

        Randomly output one of predefined words to FILE_HANDLE, which default of is STDOUT.
        Return: 1 if no problems while calling this method.

=cut
  sub affectionate {
    (ref $_[0]) ||  croak "Oops! Cannot call affectionate() using class method!";

 view all matches for this distribution


Acme-Mahjong-Rule-CC

 view release on metacpan or  search on metacpan

lib/Acme/Mahjong/Rule/CC.pm  view on Meta::CPAN


require Exporter;

our @ISA = qw(Exporter);

# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.

# This allows declaration	use Acme::Mahjong::Rule::CC ':all';
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
# will save memory.

lib/Acme/Mahjong/Rule/CC.pm  view on Meta::CPAN


=back

=head2 EXPORT

None by default.



=head1 SEE ALSO

 view all matches for this distribution


Acme-Marvel-CinematicUniverse-Characters

 view release on metacpan or  search on metacpan

lib/Acme/Marvel/CinematicUniverse/Mite.pm  view on Meta::CPAN

    my %arg = map +( lc($_) => true ), @_;
    my ( $caller, $file ) = caller;

    if( _is_compiling() ) {
        require Mite::Project;
        'Mite::Project'->default->inject_mite_functions(
            'package' => $caller,
            'file'    => $file,
            'arg'     => \%arg,
            'shim'    => $me,
        );

lib/Acme/Marvel/CinematicUniverse/Mite.pm  view on Meta::CPAN


# Usage: $me, $caller, $keyword, @has_args
sub HANDLE_has {
    my ( $me, $caller, $keyword, $names ) = ( shift, shift, shift, shift );
    if ( @_ % 2 ) {
        my $default = shift;
        unshift @_, ( 'CODE' eq ref( $default ) )
            ? ( is => lazy, builder => $default )
            : ( is => ro, default => $default );
    }
    my %spec = @_;
    my $code;
    for my $name ( ref($names) ? @$names : $names ) {
        $name =~ s/^\+//;
        'CODE' eq ref( $code = $spec{default} )
            and ${"$caller\::__$name\_DEFAULT__"} = $code;
        'CODE' eq ref( $code = $spec{builder} )
            and *{"$caller\::_build_$name"} = $code;
        'CODE' eq ref( $code = $spec{trigger} )
            and *{"$caller\::_trigger_$name"} = $code;

 view all matches for this distribution


Acme-Matt-Daemon

 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


( run in 1.598 second using v1.01-cache-2.11-cpan-0a6323c29d9 )