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
if(0) { | |
use Devel::Dwarn; | |
Dwarn $c->req->_body; | |
my $new = (); | |
my %params = %{$c->req->body_parameters||+{}}; | |
Dwarn \%params; | |
my $current_path; |
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
my $model = $c->model('Schema::Person')->new_result(+{}); | |
my $cc = $c->model('Schema::CreditCard')->new_result(+{}); | |
$model->credit_card_rs($cc, $cc, $cc); # This gives "DBIx::Class::ResultSet::search_rs(): Odd number of arguments to search" | |
$model->add_to_credit_card_rs($cc); # "DBIx::Class::ResultSource::_resolve_relationship_condition(): Argument to infer_values_based_on must be a hash " | |
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
## These last two are experimental; expect them to be removed at some point | |
## so don't rely on them in your code. | |
form => sub { | |
my ($self, $c, $model, @proto) = @_; | |
my ($inner, %attrs) = (pop(@proto), @proto); | |
my $attrs = join ' ', map { "$_='$attrs{$_}'"} keys %attrs; | |
LOCAL_TO_FORM: { | |
# Do we need a stack so we can refer to the parent or not...? | |
my @model_stack = ( |
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
t/basic.t .. # Can't initialize a schema with the given configuration | |
# Returned Error: {UNKNOWN}: {UNKNOWN}: Inconsistent hierarchy during C3 merge of class 'Component': | |
# current merge results [ | |
# Component, | |
# ] | |
# merging failed on 'DBIx::Class' at /Users/jnapiorkowski/.perlbrew/libs/perl-5.28.1@default/lib/perl5/Moo.pm line 150. | |
# Compilation failed in require at /Users/jnapiorkowski/.perlbrew/libs/perl-5.28.1@default/lib/perl5/Class/C3/Componentised.pm line 146. at /Users/jnapiorkowski/.perlbrew/libs/perl-5.28.1@default/lib/perl5/Class/C3/Componentised.pm line 151 | |
# Compilation failed in require at /Users/jnapiorkowski/.perlbrew/libs/perl-5.28.1@default/lib/perl5/Class/C3/Componentised.pm line 146. at /Users/jnapiorkowski/.perlbrew/libs/perl-5.28.1@default/lib/perl5/Class/C3/Componentised.pm line 151 | |
# Compilation failed in require at /Users/jnapiorkowski/.perlbrew/libs/perl-5.28.1@default/lib/perl5/Module/Runtime.pm line 314. | |
# configuration: { |
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
$ prove -lvr t/basic.t | |
t/basic.t .. | |
ok 1 | |
ok 2 | |
Can't locate object method "attribute_specs" via package "Method::Generate::Constructor" at /Users/jnapiorkowski/Desktop/DBIx-Class-MooResultClass/lib/DBIx/Class/MooResultClass.pm line 14. | |
# Tests were run but no plan was declared and done_testing() was not seen. | |
# Looks like your test exited with 255 just after 2. | |
Dubious, test returned 255 (wstat 65280, 0xff00) | |
All 2 subtests passed |
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 DBIx::Class::Result::Valiant; | |
use DBIx::Class::MooResultClass; | |
extends 'DBIx::Class'; | |
with 'Valiant::Validates'; | |
sub register_column { | |
my $self = shift; | |
my ($column, $info) = @_; |
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 DBIx::Class::Result::Valiant; | |
use Moo; | |
extends 'DBIx::Class'; | |
with 'Valiant::Validates'; | |
sub FOREIGNBUILDARGS { | |
my ( $class, $options ) = @_; | |
use Devel::Dwarn; |
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 Local::Base; | |
use Moo::Role; | |
has attr1 => ( | |
is => 'ro', | |
required => 1, | |
default => sub { 100 }, | |
); |
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
[info] Application powered by Catalyst 5.90125 | |
HTTP::Server::PSGI: Accepting connections at http://0:5000/ | |
[info] *** Request 1 (0.143/s) [23608] [Wed Apr 15 11:26:04 2020] *** | |
[debug] Path is "/session/login" | |
[debug] "POST" request for "login" from "127.0.0.1" | |
[debug] Body Parameters are: | |
.-------------------------------------+--------------------------------------------------------------------------. |
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
# The DBIC Resultclass | |
package Example::Schema::Result::Person; | |
use strict; | |
use warnings; | |
use base 'Example::Schema::Result'; | |
__PACKAGE__->table("person"); |