From 3852abfb5c39807cc238e46bf7247e1afcd4cca9 Mon Sep 17 00:00:00 2001 From: dakkar Date: Wed, 19 Oct 2005 18:49:40 +0000 Subject: fatto il db --- lib/Bookmarks.pm | 2 +- lib/Bookmarks/C/Main.pm | 45 +++++++++++++++++++++++++++++++++++++++++ lib/Bookmarks/M/DB.pm | 42 ++++++++++++++++++++++++++++++++++++++ lib/Bookmarks/M/DB/Links.pm | 29 ++++++++++++++++++++++++++ lib/Bookmarks/M/DB/LinksTags.pm | 29 ++++++++++++++++++++++++++ lib/Bookmarks/M/DB/Tags.pm | 29 ++++++++++++++++++++++++++ lib/Bookmarks/V/TT.pm | 29 ++++++++++++++++++++++++++ 7 files changed, 204 insertions(+), 1 deletion(-) create mode 100644 lib/Bookmarks/C/Main.pm create mode 100644 lib/Bookmarks/M/DB.pm create mode 100644 lib/Bookmarks/M/DB/Links.pm create mode 100644 lib/Bookmarks/M/DB/LinksTags.pm create mode 100644 lib/Bookmarks/M/DB/Tags.pm create mode 100644 lib/Bookmarks/V/TT.pm (limited to 'lib') diff --git a/lib/Bookmarks.pm b/lib/Bookmarks.pm index 4603e5e..f81ec80 100644 --- a/lib/Bookmarks.pm +++ b/lib/Bookmarks.pm @@ -1,7 +1,7 @@ package Bookmarks; use strict; -use Catalyst qw/-Debug/; +use Catalyst qw/-Debug Prototype/; our $VERSION = '0.01'; diff --git a/lib/Bookmarks/C/Main.pm b/lib/Bookmarks/C/Main.pm new file mode 100644 index 0000000..63744c1 --- /dev/null +++ b/lib/Bookmarks/C/Main.pm @@ -0,0 +1,45 @@ +package Bookmarks::C::Main; + +use strict; +use base 'Catalyst::Base'; + +=head1 NAME + +Bookmarks::C::Main - Catalyst component + +=head1 SYNOPSIS + +See L + +=head1 DESCRIPTION + +Catalyst component. + +=head1 METHODS + +=over 4 + +=item default + +=cut + +sub default : Private { + my ( $self, $c ) = @_; + $c->res->output('Congratulations, Bookmarks::C::Main is on Catalyst!'); +} + +=back + + +=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/lib/Bookmarks/M/DB.pm b/lib/Bookmarks/M/DB.pm new file mode 100644 index 0000000..44d7498 --- /dev/null +++ b/lib/Bookmarks/M/DB.pm @@ -0,0 +1,42 @@ +package Bookmarks::M::DB; + +use strict; +use base 'Catalyst::Model::CDBI'; +use Path::Class; + +my $DBHOME=dir(Bookmarks->config->{home})->file('bookmarks.db'); + +__PACKAGE__->config( + dsn => "dbi:SQLite:$DBHOME", + user => '', + password => '', + options => {}, + relationships => 1 +); + + +=head1 NAME + +Bookmarks::M::DB - CDBI Model Component + +=head1 SYNOPSIS + + Very simple to use + +=head1 DESCRIPTION + +Very nice component. + +=head1 AUTHOR + +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/lib/Bookmarks/M/DB/Links.pm b/lib/Bookmarks/M/DB/Links.pm new file mode 100644 index 0000000..7b8928f --- /dev/null +++ b/lib/Bookmarks/M/DB/Links.pm @@ -0,0 +1,29 @@ +package Bookmarks::M::DB::Links; + +use strict; + +=head1 NAME + +Bookmarks::M::DB::Links - CDBI Model Component Table Class + +=head1 SYNOPSIS + + Very simple to use + +=head1 DESCRIPTION + +Very nice component. + +=head1 AUTHOR + +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/lib/Bookmarks/M/DB/LinksTags.pm b/lib/Bookmarks/M/DB/LinksTags.pm new file mode 100644 index 0000000..df85fe7 --- /dev/null +++ b/lib/Bookmarks/M/DB/LinksTags.pm @@ -0,0 +1,29 @@ +package Bookmarks::M::DB::LinksTags; + +use strict; + +=head1 NAME + +Bookmarks::M::DB::LinksTags - CDBI Model Component Table Class + +=head1 SYNOPSIS + + Very simple to use + +=head1 DESCRIPTION + +Very nice component. + +=head1 AUTHOR + +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/lib/Bookmarks/M/DB/Tags.pm b/lib/Bookmarks/M/DB/Tags.pm new file mode 100644 index 0000000..3011510 --- /dev/null +++ b/lib/Bookmarks/M/DB/Tags.pm @@ -0,0 +1,29 @@ +package Bookmarks::M::DB::Tags; + +use strict; + +=head1 NAME + +Bookmarks::M::DB::Tags - CDBI Model Component Table Class + +=head1 SYNOPSIS + + Very simple to use + +=head1 DESCRIPTION + +Very nice component. + +=head1 AUTHOR + +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/lib/Bookmarks/V/TT.pm b/lib/Bookmarks/V/TT.pm new file mode 100644 index 0000000..d2063b6 --- /dev/null +++ b/lib/Bookmarks/V/TT.pm @@ -0,0 +1,29 @@ +package Bookmarks::V::TT; + +use strict; +use base 'Catalyst::View::TT'; + +=head1 NAME + +Bookmarks::V::TT - TT View Component + +=head1 SYNOPSIS + +See L + +=head1 DESCRIPTION + +TT View 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 + +1; -- cgit v1.2.3