Re: [Catalyst] Using Komodo to edit/debug Catalyst

2016-12-10 Thread Toomas P
While I don't do my debugging inside the IDE, I'm happy with what IntelliJ IDEA's Perl plugin does. Before that, I was using Komodo same as you. 2016-12-11 5:17 GMT+02:00 Kieren Diment : > I just use perl -d from the console. > > perl -d script/myapp.pl (or more modernly perl

Re: [Catalyst] Using Komodo to edit/debug Catalyst

2016-12-10 Thread Kieren Diment
I just use perl -d from the console. perl -d script/myapp.pl (or more modernly perl -d `which plackup` myapp.psgi) and set breakpoints in the code with $DB::single=1 as required. See also LWP::Protocol::PSGI for serverless psgi deployment mainly for use in test scripts. On Sun, Dec 11, 2016 at

[Catalyst] Using Komodo to edit/debug Catalyst

2016-12-10 Thread Ken Beal
Hi, Years ago I used the ActiveState IDE Komodo to work with Catalyst. I'd like to do this again, but am no longer at that employer so can't check the settings. I asked at the ActiveState Komodo forums but haven't gotten a good answer (last was "compare the env vars" which I did but didn't see

Re: [Catalyst] No database defaults with FormHandler and DBIC

2016-12-10 Thread LNATION .
My email coding has some syntax errors, apologies. On Sat, Dec 10, 2016 at 4:50 PM, LNATION . wrote: > and then make a role role > > has default_column_spec => ( ...) > > before render => sub { > while (my ($field, $default) = each %{

Re: [Catalyst] No database defaults with FormHandler and DBIC

2016-12-10 Thread LNATION .
and then make a role role has default_column_spec => ( ...) before render => sub { while (my ($field, $default) = each %{ $_[0]->default_column_spec}{ unless ($_[0]->field($filed)->value) { # mayb editing $_[0]->field('$field)->value($default); }

Re: [Catalyst] No database defaults with FormHandler and DBIC

2016-12-10 Thread LNATION .
maybe something like .. my $columns = $result->result_source->columns_info; my %default_form_spec; for my $name (keys %{$columns}){ if (my $default = $columns->{$name}->{default_value}) { $default_form_spec{ $name } = $default; } }

Re: [Catalyst] No database defaults with FormHandler and DBIC

2016-12-10 Thread Martin Řehák
Also form definition looks like this: has 'formDetail' => (isa => 'reha::Form::LessonDetail', is => 'rw', lazy => 1, default => sub {reha::Form::LessonDetail->new }); Is that right in case I would like to have database defaults used after process()? Regards -- M. On 2016.12.10

Re: [Catalyst] No database defaults with FormHandler and DBIC

2016-12-10 Thread Martin Řehák
Hi Gerda, sorry for late reply. Didn't have time to look into this. Now I have: my $init_row = $c->model('DB::Lesson')->new_result({}); $validated = $self->formDetail->process(item => $init_row); And I still don't see the database defaults in the rendered form. Any clue where