summaryrefslogtreecommitdiff
path: root/GroLUG/lib
diff options
context:
space:
mode:
Diffstat (limited to 'GroLUG/lib')
-rw-r--r--GroLUG/lib/GroLUG.pm60
-rw-r--r--GroLUG/lib/GroLUG/C/Iscritti.pm49
-rw-r--r--GroLUG/lib/GroLUG/M/DB.pm27
-rw-r--r--GroLUG/lib/GroLUG/M/DB/Iscritto.pm2
4 files changed, 53 insertions, 85 deletions
diff --git a/GroLUG/lib/GroLUG.pm b/GroLUG/lib/GroLUG.pm
index dca5de0..404fde1 100644
--- a/GroLUG/lib/GroLUG.pm
+++ b/GroLUG/lib/GroLUG.pm
@@ -3,45 +3,12 @@ package GroLUG;
use strict;
use warnings;
-#
-# Set flags and add plugins for the application
-#
-# -Debug: activates the debug mode for very useful log messages
-# Static::Simple: will serve static files from the application's root
-# directory
-#
-use Catalyst qw/-Debug ConfigLoader Static::Simple/;
+use Catalyst qw/-Debug ConfigLoader Static::Simple DefaultEnd Session Session::Store::DBI Session::State::Cookie/;
our $VERSION = '0.01';
-#
-# Start the application
-#
__PACKAGE__->setup;
-=head1 NAME
-
-GroLUG - Catalyst based application
-
-=head1 SYNOPSIS
-
- script/grolug_server.pl
-
-=head1 DESCRIPTION
-
-Catalyst based application.
-
-=head1 METHODS
-
-=cut
-
-=head2 default
-
-=cut
-
-#
-# Output a friendly welcome message
-#
sub default : Private {
my ( $self, $c ) = @_;
@@ -49,29 +16,4 @@ sub default : Private {
$c->response->body( $c->welcome_message );
}
-#
-# Uncomment and modify this end action after adding a View component
-#
-#=head2 end
-#
-#=cut
-#
-#sub end : Private {
-# my ( $self, $c ) = @_;
-#
-# # Forward to View unless response body is already defined
-# $c->forward( $c->view('') ) unless $c->response->body;
-#}
-
-=head1 AUTHOR
-
-Catalyst developer
-
-=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/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;