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


Acme-Turing

 view release on metacpan or  search on metacpan

Turing.pm  view on Meta::CPAN


=back

=head1 EXAMPLE

The following example computes the logical OR of two symbols.

  use Acme::Turing;
  $m1 = Acme::Turing->new();
  $m1->init_tape(100, '0', '1');
  $m1->add_spec('START:0', "R:MAYBE");

 view all matches for this distribution


Acme-UNIVERSAL-can-t

 view release on metacpan or  search on metacpan

doap.ttl  view on Meta::CPAN

@prefix dc:    <http://purl.org/dc/terms/> .
@prefix doap:  <http://usefulinc.com/ns/doap#> .
@prefix doap-changeset: <http://ontologi.es/doap-changeset#> .
@prefix doap-deps: <http://ontologi.es/doap-deps#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .

<http://dev.perl.org/licenses/>

 view all matches for this distribution


Acme-UTOPIA-Utils

 view release on metacpan or  search on metacpan

lib/Acme/UTOPIA/Utils.pm  view on Meta::CPAN

If your Modified Version has been derived from a Modified Version made
by someone other than you, you are nevertheless required to ensure that
your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service
mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge
patent license to make, have made, use, offer to sell, sell, import and
otherwise transfer the Package with respect to any patent claims
licensable by the Copyright Holder that are necessarily infringed by the

 view all matches for this distribution


Acme-Umlautify

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


	Almost concurrently, Nick Wellnhofer <nwellnhof@cpan.org> opened 
		RT #93530 which suggested a UTF solution to the lack of
		umlauts for Latin lower-case y.

	Added a terminology section to the documentation.

1.06  2014/03/03

	Updated POD and README text
	Exporting 'umlautify' by default. Just because.

 view all matches for this distribution


Acme-Unicodify

 view release on metacpan or  search on metacpan

CODE_OF_CONDUCT.md  view on Meta::CPAN

community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
  overall community

Examples of unacceptable behavior include:

CODE_OF_CONDUCT.md  view on Meta::CPAN

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

 view all matches for this distribution


Acme-UseStrict

 view release on metacpan or  search on metacpan

doap.ttl  view on Meta::CPAN

@prefix dc:    <http://purl.org/dc/terms/> .
@prefix doap:  <http://usefulinc.com/ns/doap#> .
@prefix doap-changeset: <http://ontologi.es/doap-changeset#> .
@prefix doap-deps: <http://ontologi.es/doap-deps#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .

<http://dev.perl.org/licenses/>

 view all matches for this distribution


Acme-VarMess

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, << ".");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
.
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


Acme-Version-Hex

 view release on metacpan or  search on metacpan

inc/MyVersionProvider.pm  view on Meta::CPAN

    my $self = shift;

    my $assign_regex = qr/our\s+\$VERSION\s*=\s*(0x(?:\d*\.)?\d+p[+-]\d+)\s*;/;
    my $eval_regex = qr/\$VERSION\s*=\s*eval\s*\$VERSION;/;
    my ($version, $eval) = $self->zilla->main_module->content=~ m{^$assign_regex\s*($eval_regex)?[^\n]*$}ms;
    $self->log([ 'got version %s', $version ]);

    $version = eval $version if $eval;
    $self->log([ 'evaluated version to %s', $version ]) if $eval;

    return $version;
}

{

 view all matches for this distribution


Acme-VerySign

 view release on metacpan or  search on metacpan

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

=head1 DESCRIPTION

After all is said and done, it's not actually that helpful that perl
returns an error whenever it can't find a subroutine.

This module solves this.  With new I<subfinder> technology whenever
perl can't call a subroutine it automatically returns a scalar that
stringifies to "64.94.110.11" instead!

But wait!  There's more - due to our use of B<Symbol::Approx::Sub>
technology if you treat the scalar as an arrayref you can get the
names of the subroutines we think you meant!  You can even specify
the way we do searching using B<Symbo::Approx::Sub> semantics (i.e.
we support the 'match' and 'xform' parameters.

  use Acme::VerySign xform => "Text::Metaphone";

 view all matches for this distribution


Acme-W

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
END_FTP
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


Acme-Wabby

 view release on metacpan or  search on metacpan

ChangeLog  view on Meta::CPAN

version 0.13 (09/21/2005):
	* No changes, accidently uploaded 0.11 as 0.12, bump version so I can
  	  upload this to CPAN.

version 0.12 (09/21/2005):
	* Fix dumb logic in the constructor and expand the test cases to be more
	  complete.

version 0.11 (08/10/2005):
	* Swap to using ref to ensure that a reference is an Acme::Wabby object

 view all matches for this distribution


Acme-Web20-Validator

 view release on metacpan or  search on metacpan

lib/Acme/Web20/Validator.pm  view on Meta::CPAN


L<Module::Pluggable>

=head1 TODO

Improve Catalyst, Rails checking logic.
Add more rules.

=head1 AUTHOR

Naoya Ito, E<lt>naoya@bloghackers.netE<gt>

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

 view all matches for this distribution


Acme-What

 view release on metacpan or  search on metacpan

doap.ttl  view on Meta::CPAN

@prefix dc:    <http://purl.org/dc/terms/> .
@prefix doap:  <http://usefulinc.com/ns/doap#> .
@prefix doap-changeset: <http://ontologi.es/doap-changeset#> .
@prefix doap-deps: <http://ontologi.es/doap-deps#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .

<http://dev.perl.org/licenses/>

 view all matches for this distribution


Acme-Working-Out-Dependencies-From-META-files-Will-Be-Wrong-At-Some-Point-Like-This-Module-For-Instance

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

  'DateTime::Locale', '0.45',
  'DateTime::TimeZone', '1.34',
  'Devel::Caller', '2.05',
  'Devel::GlobalDestruction', '0.03',
  'Devel::PatchPerl', '0.36',
  'Dist::Zilla::Plugin::ChangelogFromGit', '0.002',
  'Dist::Zilla::Plugin::MakeMaker::Awesome', '0.12',
  'Dist::Zilla::Plugin::ReadmeFromPod', '0.14',
  'Dist::Zilla::Plugin::ReportVersions', '1.110730',
  'Dist::Zilla::Util::Test::KENTNL', '0.01015821',
  'Email::Valid', '0.184',

 view all matches for this distribution


Acme-YAPC-Asia-2012-LTthon-Hakushu

 view release on metacpan or  search on metacpan

xt/podspell.t  view on Meta::CPAN

# computer terms
API
APIs
arrayrefs
arity
Changelog
codebase
committer
committers
compat
cpan

xt/podspell.t  view on Meta::CPAN

invocant's
irc
IRC
isa
JSON
login
namespace
namespaced
namespaces
namespacing
OO

 view all matches for this distribution


Acme-YAPC-Okinawa-Bus

 view release on metacpan or  search on metacpan

lib/Acme/YAPC/Okinawa/ppport.h  view on Meta::CPAN


The name and version of the module you were trying to build.

=item 4.

A full log of the build that failed.

=item 5.

Any other information that you think could be relevant.

lib/Acme/YAPC/Okinawa/ppport.h  view on Meta::CPAN

memEQs|5.009005||p
memEQ|5.004000||p
memNEs|5.009005||p
memNE|5.004000||p
mem_collxfrm|||
mem_log_common|||n
mess_alloc|||
mess_nocontext|||vn
mess_sv||5.013001|
mess||5.006000|v
mfree||5.007002|n

lib/Acme/YAPC/Okinawa/ppport.h  view on Meta::CPAN

newXS||5.006000|
new_collate||5.006000|
new_constant|||
new_ctype||5.006000|
new_he|||
new_logop|||
new_numeric||5.006000|
new_stackinfo||5.005000|
new_version||5.009000|
new_warnings_bitfield|||
next_symbol|||

lib/Acme/YAPC/Okinawa/ppport.h  view on Meta::CPAN

whichsig|||
win32_croak_not_implemented|||n
with_queued_errors|||
wrap_op_checker||5.015008|
write_to_stderr|||
xs_boot_epilog|||
xs_handshake|||vn
xs_version_bootcheck|||
yyerror_pvn|||
yyerror_pv|||
yyerror|||

 view all matches for this distribution


Acme-Your

 view release on metacpan or  search on metacpan

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


=head1 BUGS

Acme::Your functions by parsing your source code and filtering it
with a source filter.  It is possible to fool the parser with some
pathelogical cases and you should be aware that this module faces all
the standard problems that perl faces when parsing Perl Code.

=head1 VERSION

Acme::Your 0.01 was released on 14th January 2002.

 view all matches for this distribution


Acme-ZydecoTesting-App1

 view release on metacpan or  search on metacpan

doap.ttl  view on Meta::CPAN

@prefix dc:    <http://purl.org/dc/terms/> .
@prefix doap:  <http://usefulinc.com/ns/doap#> .
@prefix doap-changeset: <http://ontologi.es/doap-changeset#> .
@prefix doap-deps: <http://ontologi.es/doap-deps#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .

<http://dev.perl.org/licenses/>

 view all matches for this distribution


Acme-constant

 view release on metacpan or  search on metacpan

dist.ini  view on Meta::CPAN

[AutoPrereqs]
[PkgVersion]
[ExtraTests]
[PodCoverageTests]
[PodSyntaxTests]
[ChangelogFromGit]

 view all matches for this distribution


Acme-emcA

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
END_FTP
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


Acpi-Class

 view release on metacpan or  search on metacpan

t/Acpi/Class.t  view on Meta::CPAN

use warnings;
use 5.010;
use Acpi::Class;
use Test::More tests => 1;

# Check if the value of /sys/class/power_supply/$bat/technology 
# is the same that the one reported by Acpi::Class
my $class   = Acpi::Class->new( class => 'power_supply' );
# my $dir = '/sys/class/power_supply';
my $dir = '/home/mimosinnet/borrem';
my $battery;

t/Acpi/Class.t  view on Meta::CPAN

		$battery = $_ if ($_ =~ /BAT/);
	}
	closedir($device_dir);
	if (defined $battery) 
	{
		my $file = "$dir/$battery/technology";
		if (-f $file ) {
			my $content = do {
				local @ARGV = $file; 
				local $/    = <ARGV>;
			};
			$class->device($battery);
			my $bat_technology = $class->g_values->{'technology'};
			ok ( $bat_technology = $content, "Returned the correct value of $battery technology: $content");
		}
	}
	else
	{
		ok ( 1, "There is no BAT* file in folder $dir");

 view all matches for this distribution


Acpi

 view release on metacpan or  search on metacpan

Battery.pm  view on Meta::CPAN

	my($self) = shift;

	return $self->getBatteryInfo("design capacity");
}

sub getBatteryTechnology{
	my($self) = shift;
	
	return $self->getBatteryInfo("battery technology");
}

sub getBatteryType{
	my($self) = shift;

Battery.pm  view on Meta::CPAN


Return a hash composed by the name of the battery and the design capacity.

=item *

getBatteryTechnology();

Return a hash composed by the name of the battery and the technology.

=item *

getBatteryType();

 view all matches for this distribution


Acrux

 view release on metacpan or  search on metacpan

eg/acrux_log.pl  view on Meta::CPAN

use utf8;

use Acrux::Log;
use IO::Handle;

my $log = Acrux::Log->new(
    handle => IO::Handle->new_from_fd(fileno(STDOUT), "w"),
    level  => 'trace',
    #short  => 1,
    color  => 1,
    #format => sub {
    #    my ($time, $level, @lines) = @_;
    #    return "[$time] [$level] " . join (' ', @lines) . "\n";
    #}
);

$log->trace('Whatever');
$log->debug('You screwed up, but that is ok');
$log->info('You are bad, but you prolly know already');
$log->notice('Normal, but significant, condition...');
$log->warn('Dont do that Dave...');
$log->error('You really screwed up this time');
$log->fatal('Its over...');
$log->crit('Its over...');
$log->alert('Action must be taken immediately');
$log->emerg('System is unusable');

__END__

 view all matches for this distribution


Action-CircuitBreaker

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

                  "allow_dirty" : [
                     "Changes",
                     "dist.ini"
                  ],
                  "allow_dirty_match" : [],
                  "changelog" : "Changes"
               },
               "Dist::Zilla::Role::Git::Repo" : {
                  "git_version" : "2.17.0",
                  "repo_root" : "."
               }

META.json  view on Meta::CPAN

                  "allow_dirty" : [
                     "Changes",
                     "dist.ini"
                  ],
                  "allow_dirty_match" : [],
                  "changelog" : "Changes"
               },
               "Dist::Zilla::Role::Git::Repo" : {
                  "git_version" : "2.17.0",
                  "repo_root" : "."
               },

META.json  view on Meta::CPAN

         {
            "class" : "Dist::Zilla::Plugin::Git::Tag",
            "config" : {
               "Dist::Zilla::Plugin::Git::Tag" : {
                  "branch" : null,
                  "changelog" : "Changes",
                  "signed" : 0,
                  "tag" : "v0.1",
                  "tag_format" : "v%v",
                  "tag_message" : "v%v"
               },

 view all matches for this distribution


Activator

 view release on metacpan or  search on metacpan

bin/activator.pl  view on Meta::CPAN

 Actions
  sync : sync user codebase to target install base

 Options:
  --restart : (re)start the webserver after performing <ACTION>
  --log_level : One of TRACE, DEBUG, INFO, WARN, ERROR, FATAL (see L<Activator::Log>)
  --sync_dir : ignore sync_dir setting from configuration, use this.

 Todo:
  --activator_codebase=<path> : use alternate Activator codebase (for Activator development)

bin/activator.pl  view on Meta::CPAN


if ( catch my $e ) {
    die( "Error while processing command line options: $e" );
}

my $log_level = $config->{log_level} || 'WARN';
if ( $config->{v} || $config->{verbose} ) {
    Activator::Log->level( 'INFO' );
}

$action  = $ARGV[-2];

bin/activator.pl  view on Meta::CPAN


		"mkdir -p $config->{sync_target}",
		"mkdir -p $config->{sync_run_dir}",
		"mkdir -p $config->{sync_lock_dir}",
		"mkdir -p $config->{sync_conf_dir}",
		"mkdir -p $config->{sync_log_dir}",

		"mkdir -p $perl5lib",
		"mkdir -p $document_root",
		"mkdir -p $server_root/logs",

		# all your perl lib are belong to PERL5LIB
		"rsync -a $rsync_flags $project_codebase/lib/* $perl5lib",

		# symlink template files so we don't have to restart server

bin/activator.pl  view on Meta::CPAN

		"ln -sf $project_codebase/root $document_root",

		# symlink apache modules
		"ln -sf /usr/lib/httpd/modules $server_root",

		# symlink apache log files
		"ln -sf $server_root/logs $config->{sync_log_dir}/httpd",

	       );


    if ( $config->{activator_codebase} ) {

bin/activator.pl  view on Meta::CPAN

				      ABSOLUTE => 1,
				      OUTPUT_PATH  => $config->{sync_conf_dir},
				    }
				  );
	    DEBUG( qq(tt processing: $fq_source_file, $config, $out ));
	    $tt->process( $fq_source_file, $config, $out ) || Activator::Log->logdie( $tt->error()."\n");
	}

	# just copy the file
	else {
	    my $rsync_flags = ( $config->{debug} ? '-v' : '' );

bin/activator.pl  view on Meta::CPAN


sub restart {

    my $httpd_conf = $config->{apache2}->{ServerRoot} . '/conf/httpd.conf';
    if ( !-f $httpd_conf ) {
	Activator::Log->logdie( "apache config not found: '$httpd_conf'");
    }

    my $httpd_pid = $config->{apache2}->{PidFile};

    my $cmd;

bin/activator.pl  view on Meta::CPAN

    my $tt = Template->new( { DEBUG => 1,
			      ABSOLUTE => 1,
			      OUTPUT_PATH  => $config->{apache2}->{ServerRoot},
			    }
			  );
    $tt->process( $fq, $config, $out ) || Activator::Log->logdie( $tt->error()."\n");

    # TODO: use some smart hueristics to properly chmod that which
    # should be executable
    #
    #if( $out =~ m@/s?bin/|/init.d/@ ) {

 view all matches for this distribution


ActiveRecord-Simple

 view release on metacpan or  search on metacpan

lib/ActiveRecord/Simple.pm  view on Meta::CPAN

    package Customer;

    use parent 'Model';

    __PACKAGE__->table_name('customer');
    __PACKAGE__->columns(qw/id first_name last_login/);
    __PACKAGE__->primary_key('id');

    __PACKAGE__->has_many(purchases => 'Purchase');


lib/ActiveRecord/Simple.pm  view on Meta::CPAN


    # or (the same):
    my $customer = Customer->objects->get(1);

    print $customer->first_name; # print first name
    $customer->last_login(\'NOW()'); # to use built-in database function just send it as a SCALAR ref
    $customer->save(); # save in the database

    # get all purchases of $customer:
    my @purchases = Purchase->objects->find(customer => $customer)->fetch();

lib/ActiveRecord/Simple.pm  view on Meta::CPAN


=head2 new

Object's constructor.

    my $log = Log->new(message => 'hello', level => 'info');

=head2 connect

Connect to the database, uses DBIx::Connector if installed, if it's not - L<ActiveRecord::Simple::Connect>.
    

lib/ActiveRecord/Simple.pm  view on Meta::CPAN


=head2 table_name

Set table name.

    __PACKAGE__->table_name('log');


=head2 columns

Set columns. Make accessors if make_columns_accessors not 0 (default is 1)

lib/ActiveRecord/Simple.pm  view on Meta::CPAN

=head2 make_columns_accessors

Set to 0 before method 'columns' if you don't want to make accessors to columns:

    __PACKAGE__->make_columns_accessors(0);
    __PACKAGE__->columns('id', 'time'); # now you can't get $log->id and $log->time, only $log->{id} and $log->{time};

=head2 mixins

Create calculated fields

lib/ActiveRecord/Simple.pm  view on Meta::CPAN


=head2 update

Update object using hashref

    $user->update({ last_login => \'NOW()' });


=head2 to_hash

Unbless object, get naked hash

 view all matches for this distribution


ActiveResource

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
END_FTP
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


Adam

 view release on metacpan or  search on metacpan

ex/rt-plugin.pl  view on Meta::CPAN

        handles    => { show_ticket => [ 'show', ( type => 'ticket' ) ] },
    );

    sub _build_rt {
        my $rt = RT::Client::REST->new( server => $_[0]->server );
        $rt->login( username => $_[0]->user, password => $_[0]->pass, );
        return $rt;
    }

    sub ticket {
        my ( $self, $id ) = @_;

 view all matches for this distribution


Adapter-Async

 view release on metacpan or  search on metacpan

lib/Adapter/Async/Model.pm  view on Meta::CPAN


Note that methods are applied via a UNITCHECK block by default.

=cut

use Log::Any qw($log);

use Future;

use Module::Load;
use Data::Dumper;

lib/Adapter/Async/Model.pm  view on Meta::CPAN

		my %collection_class_for = (
			UnorderedMap => 'Adapter::Async::UnorderedMap::Hash',
			OrderedList  => 'Adapter::Async::OrderedList::Array',
		);
		if(defined(my $from = $details->{from})) {
			$log->tracef("Should apply field %s from %s for %s", $k, $from, $pkg);
			++$loader{$_} for grep /::/, map $type_expand->($_), @{$details}{qw(type)};
		} else {
			no strict 'refs';
			no warnings 'once';
			push @{$pkg . '::attrs'}, $k unless $details->{collection}
		}

		if(my $type = $details->{collection}) {
			my $collection_class = $collection_class_for{$type} // die "unknown collection $type";
			++$loader{$collection_class};
			$log->tracef("%s->%s collection: %s", $pkg, $k, $type);
			++$loader{$_} for grep /::/, map $type_expand->($_), @{$details}{qw(key item)};
			$code = sub {
				my $self = shift;
				die "no args expected" if @_;
				$self->{$k} //= $collection_class->new;
			}
		} else {
			my $type = $type_expand->($details->{type} // die "unknown type in package $pkg - " . Dumper($def));
			++$loader{$type} if $type =~ /::/;

			$log->tracef("%s->%s scalar %s", $pkg, $k, $type);
			$code = sub {
				my ($self) = shift;
				return $self->{$k} unless @_;
				$self->{$k} = shift;
				return $self

lib/Adapter/Async/Model.pm  view on Meta::CPAN

		retain_future(
			$self->$type->exists($v)->then(sub {
				return $self->$type->get_key($v) if shift;

				my $item = $create->($v);
				$log->tracef("Set %s on %s for %s to %s via %s", $v, $type, "$self", $item, ''.$self->$type);
				$self->$type->set_key(
					$v => $item
				)->transform(
					done => sub { $item }
				)
			})
		)
	};

	for(sort keys %loader) {
		$log->tracef("Loading %s for %s", $_, $pkg);
		Module::Load::load($_) unless exists($defined{$_}) || $_->can('new')
	}

	my $apply_methods = sub {
		while(my ($k, $code) = splice @methods, 0, 2) {
			no strict 'refs';
			if($pkg->can($k)) {
				$log->tracef("Not creating method %s for %s since it exists already", $k, $pkg);
			} else {
				*{$pkg . '::' . $k} = $code;
			}
		}
	};

 view all matches for this distribution


Addr-MyIP

 view release on metacpan or  search on metacpan

MANIFEST.SKIP  view on Meta::CPAN

.travis.yml$
.iml$
examples/
build/
^\w+.list$
.bblog$
.base$
BB-Pass/
BB-Fail/
cover_db/
scrap\.pl

 view all matches for this distribution


( run in 1.531 second using v1.01-cache-2.11-cpan-49f99fa48dc )