diff options
Diffstat (limited to 'GroLUG/lib/GroLUG')
-rw-r--r-- | GroLUG/lib/GroLUG/C/Iscritti.pm | 49 | ||||
-rw-r--r-- | GroLUG/lib/GroLUG/M/DB.pm | 27 | ||||
-rw-r--r-- | GroLUG/lib/GroLUG/M/DB/Iscritto.pm | 2 |
3 files changed, 52 insertions, 26 deletions
diff --git a/GroLUG/lib/GroLUG/C/Iscritti.pm b/GroLUG/lib/GroLUG/C/Iscritti.pm new file mode 100644 index 0000000..d79aea6 --- /dev/null +++ b/GroLUG/lib/GroLUG/C/Iscritti.pm @@ -0,0 +1,49 @@ +package GroLUG::C::Iscritti; + +use strict; +use warnings; +use base 'Catalyst::Controller'; + +=head1 NAME + +GroLUG::C::Iscritti - Catalyst Controller + +=head1 SYNOPSIS + +See L<GroLUG> + +=head1 DESCRIPTION + +Catalyst Controller. + +=head1 METHODS + +=cut + +# +# Uncomment and modify this or add new actions to fit your needs +# +#=head2 default +# +#=cut +# +#sub default : Private { +# my ( $self, $c ) = @_; +# +# # Hello World +# $c->response->body('GroLUG::C::Iscritti is on Catalyst!'); +#} + + +=head1 AUTHOR + +A clever guy + +=head1 LICENSE + +This library is free software, you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; diff --git a/GroLUG/lib/GroLUG/M/DB.pm b/GroLUG/lib/GroLUG/M/DB.pm index 193cb7a..2622de2 100644 --- a/GroLUG/lib/GroLUG/M/DB.pm +++ b/GroLUG/lib/GroLUG/M/DB.pm @@ -10,31 +10,8 @@ my @conn_info = ( { RaiseError => 1, PrintError => 0, ShowErrorStatement => 1, TraceLevel => 0 } ); -__PACKAGE__->load_classes; -#DBIx::Class::Schema->compose_connection( __PACKAGE__, @conn_info ); - -=head1 NAME - -GroLUG::M::DB - DBIC Plain Model Component - -=head1 SYNOPSIS - -See L<GroLUG> - -=head1 DESCRIPTION - -DBIC Plain Model Component. - -=head1 AUTHOR - -A clever guy - -=head1 LICENSE - -This library is free software . You can redistribute it and/or modify -it under the same terms as perl itself. - -=cut +__PACKAGE__->load_classes(); +__PACKAGE__->compose_connection(__PACKAGE__,@conn_info); 1; diff --git a/GroLUG/lib/GroLUG/M/DB/Iscritto.pm b/GroLUG/lib/GroLUG/M/DB/Iscritto.pm index 5ae0d33..686b4b2 100644 --- a/GroLUG/lib/GroLUG/M/DB/Iscritto.pm +++ b/GroLUG/lib/GroLUG/M/DB/Iscritto.pm @@ -5,6 +5,6 @@ __PACKAGE__->load_components(qw(PK::Auto::Pg)); __PACKAGE__->table('iscritti'); __PACKAGE__->add_columns(qw(id nome email attivo note)); __PACKAGE__->set_primary_key('id'); -__PACKAGE__->has_many(pagamenti=>'GroLUG::M::DB::Pagamento','iscritto'); +__PACKAGE__->has_many(pagamenti=>'GroLUG::M::DB::Pagamento','iscritto',{order_by => 'data_scadenza desc'}); 1; |