Skip to content

Instantly share code, notes, and snippets.

View jjn1056's full-sized avatar

John Napiorkowski jjn1056

View GitHub Profile
if(0) {
use Devel::Dwarn;
Dwarn $c->req->_body;
my $new = ();
my %params = %{$c->req->body_parameters||+{}};
Dwarn \%params;
my $current_path;
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 "
## 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 = (
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: {
$ 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
package DBIx::Class::Result::Valiant;
use DBIx::Class::MooResultClass;
extends 'DBIx::Class';
with 'Valiant::Validates';
sub register_column {
my $self = shift;
my ($column, $info) = @_;
package DBIx::Class::Result::Valiant;
use Moo;
extends 'DBIx::Class';
with 'Valiant::Validates';
sub FOREIGNBUILDARGS {
my ( $class, $options ) = @_;
use Devel::Dwarn;
package Local::Base;
use Moo::Role;
has attr1 => (
is => 'ro',
required => 1,
default => sub { 100 },
);
[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:
.-------------------------------------+--------------------------------------------------------------------------.
@jjn1056
jjn1056 / weird.pm
Created April 12, 2020 12:48
unexpected stuff with SQLT
# The DBIC Resultclass
package Example::Schema::Result::Person;
use strict;
use warnings;
use base 'Example::Schema::Result';
__PACKAGE__->table("person");