This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
John-Napiorkowski-MacBook-Pro:MooseX-Types-Structured johnn$ perl -Ilib benchmark/basic.pl | |
Couldn't load class (MooseX::Declare::Syntax::MooseSetup) because: Couldn't load class (MooseX::Declare::Syntax::MethodDeclaration) because: MooseX::Types::Structured does not define $MooseX::Types::Structured::VERSION--version check failed at /Users/johnn/locallib510/lib/perl5/MooseX/Method/Signatures/Types.pm line 11. | |
BEGIN failed--compilation aborted at /Users/johnn/locallib510/lib/perl5/MooseX/Method/Signatures/Types.pm line 11. | |
Compilation failed in require at /Users/johnn/locallib510/lib/perl5/MooseX/Method/Signatures/Meta/Method.pm line 21. | |
BEGIN failed--compilation aborted at /Users/johnn/locallib510/lib/perl5/MooseX/Method/Signatures/Meta/Method.pm line 21. | |
......and on and on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# building the dist for real | |
my $ok = eval { | |
my $wd = File::pushd::pushd($target); | |
$builders[0]->build; | |
my $extralibs = | |
join $Config::Config{path_sep}, | |
map { $abstarget->subdir('blib', $_) } qw{ arch lib }; | |
local $ENV{PERL5LIB} = $extralibs .$Config::Config{path_sep}. $ENV{PERL5LIB}; | |
system(@$cmd) and die "error while running: @$cmd"; | |
1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use CatalystX::Declare; | |
namespace TestApp; | |
role hasActionParams { | |
has [qw/p1 p2/] => (is=>'ro', lazy_build=>1); | |
method _build_p1 { | |
join ',', @{$self->attributes->{p1}}; | |
} | |
method _build_p2 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Plack::Middleware::Debug::W3CValidate; | |
our $VERSION = '0.01'; | |
use 5.008; | |
use strict; | |
use warnings; | |
use parent qw(Plack::Middleware::Debug::Base); | |
use WebService::Validator::HTML::W3C; | |
use Plack::Util::Accessor qw(validator_uri); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## in base class | |
has 'force_drop_table' => ( | |
traits=>['ENV'], | |
is=>'rw', | |
isa=>'Bool', | |
required=>1, | |
default=>0, | |
); | |
## in a role |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| photo_exif_values | CREATE TABLE `photo_exif_values` ( | |
`id` int(10) unsigned NOT NULL auto_increment, | |
`value` text, | |
PRIMARY KEY (`id`), | |
UNIQUE KEY `value` (`value`(128)) | |
) ENGINE=MyISAM AUTO_INCREMENT=153362543 DEFAULT CHARSET=latin1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my @core_requires = ( | |
'Data::UUID' => '1.215', | |
'DateTime' => '0.61', | |
'Moose' => '1.12', | |
'MooseX::Types' => '0.23', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use CatalystX::Declare; | |
namespace MyApp::Web::Controller; | |
controller ::API::Photos { | |
extends 'Catalyst::Controller::DBIC::API::REST'; | |
$CLASS->config( | |
default => 'text/xml', | |
class => 'Schema::Photo', | |
page_arg => 'page', | |
count_arg => 'count', | |
ordered_by_arg => 'sort', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
under start { | |
final action landing as ''; | |
final action gallery(Str $name) as '' | |
with BuildDBICResult( | |
store=>'category_rs', | |
find_condition=>[{columns=>['name']}], | |
) { | |
if(my $category = $ctx->stash->{category_rs}->find({name=>$name})) { | |
my %params = %{$ctx->req->query_parameters}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Catalyst::TraitFor::Model::DBIC::Schema::QueryLog::PlackDebugPanel; | |
use Moose::Role; | |
our $VERSION = "0.01"; | |
around 'ACCEPT_CONTEXT', sub { | |
my ($orig, $self, $ctx) = @_; | |
$self = $self->$orig($ctx); | |
$ctx->engine->env->{'plack.middleware.querylog'} = $self->querylog | |
if defined $ctx->engine->env; |