File: Exception.pm

package info (click to toggle)
libhtml-formfu-perl 2.05000-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,328 kB
  • ctags: 831
  • sloc: perl: 12,785; makefile: 9; sql: 5
file content (36 lines) | stat: -rw-r--r-- 584 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package HTML::FormFu::Exception;

use strict;
our $VERSION = '2.05'; # VERSION

use Moose;

with 'HTML::FormFu::Role::Populate';

use HTML::FormFu::ObjectUtil qw( form parent );

sub BUILD { }

sub render_data {
    my $self = shift;

    my $render = $self->render_data_non_recursive( { @_ ? %{ $_[0] } : () } );

    return $render;
}

sub render_data_non_recursive {
    my ( $self, $args ) = @_;

    my %render = (
        parent => $self->parent,
        form   => $self->form,
        $args ? %$args : (),
    );

    return \%render;
}

__PACKAGE__->meta->make_immutable;

1;