Silki.pm untested

filter: Statementstmt 0.0% 0 / 72 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 17 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 101 CC 3 SCAR 12.8
CC
3
Cov
0%
BEGIN
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 package Silki;
2 {
3 $Silki::VERSION = '0.29';
4 }
5  
6 use strict;
7 use warnings;
8 use namespace::autoclean;
9  
10 use 5.10.0;
11  
12 use Catalyst::Runtime 5.8;
13  
14 use CatalystX::RoleApplicator;
15 use Catalyst::Plugin::Session 0.27;
16 use Catalyst::Request::REST::ForBrowsers;
17 use HTTP::Body 1.09; # for temp file upload suffix preservation
18 use Silki::Config;
19 use Silki::I18N ();
20 use Silki::Request;
21 use Silki::Schema;
22 use Silki::Types qw( Str );
23 use Silki::Web::Session;
24  
25 use Moose;
26  
27 my $Config;
28  
29 BEGIN {
30 extends 'Catalyst';
31  
32 $Config = Silki::Config->instance();
33  
34 my @imports = qw(
35 AuthenCookie
36 +Silki::Plugin::ErrorHandling
37 Session::AsObject
38 Session::State::URI
39 +Silki::Plugin::Session::Store::Silki
40 RedirectAndDetach
41 SubRequest
42 Unicode::Encoding
43 );
44  
45 push @imports, 'Static::Simple'
46 if $Config->serve_static_files();
47  
48 push @imports, 'StackTrace'
49 unless $Config->is_production() || $Config->is_profiling();
50  
51 Catalyst->import(@imports);
52  
53 Silki::Schema->LoadAllClasses();
54 }
55  
56 with qw(
57 Silki::AppRole::Domain
58 Silki::AppRole::RedirectWithError
59 Silki::AppRole::Tabs
60 Silki::AppRole::User
61 );
62  
63 {
64 my %config = (
65 name => 'Silki',
66 default_view => 'Mason',
67 'Plugin::Session' => {
68 expires => ( 60 * 5 ),
69  
70 # Need to quote it for Pg
71 dbi_table => q{"Session"},
72 dbi_dbh => 'Silki::Plugin::Session::Store::Silki',
73 object_class => 'Silki::Web::Session',
74 rewrite_body => 0,
75 rewrite_redirect => 1,
76 },
77 authen_cookie => {
78 name => 'Silki-user',
79 path => '/',
80 mac_secret => $Config->secret(),
81 },
82 encoding => 'UTF-8',
83 root => $Config->share_dir()->stringify(),
84 );
85  
86 unless ( $Config->is_production() ) {
87 $config{static} = {
88 dirs => [qw( files images js css static )],
89 include_path => [
90 map { $Config->$_()->stringify() }
91 qw( cache_dir var_lib_dir share_dir )
92 ],
93 debug => 1,
94 };
95 }
96  
97 __PACKAGE__->config(\%config);
98 }
99  
100 __PACKAGE__->apply_request_class_roles('Silki::Request');
101  
102 Silki::Schema->EnableObjectCaches();
103  
104 __PACKAGE__->setup();
105  
106 __PACKAGE__->meta()->make_immutable( replace_constructor => 1 );
107  
108 1;
109  
110 # ABSTRACT: Silki is a Catalyst-based wiki hosting platform
111  
112  
113  
114 =pod
115  
116 =head1 NAME
117  
118 Silki - Silki is a Catalyst-based wiki hosting platform
119  
120 =head1 VERSION
121  
122 version 0.29
123  
124 =head1 DESCRIPTION
125  
126 Silki is a wiki hosting application with several core goals.
127  
128 Usability is a core value for Silki. Many wiki applications seem to be aimed
129 at geeks, which is great, but wikis are useful in many fields, not just
130 geekery. Ease of use means providing a simple, well thought-out UI, offering
131 hand-holding wherever it's needed, and avoiding jargon. It also means that
132 features take a back seat to usability. A bloated application is a hard-to-use
133 application.
134  
135 Silki is a I<wiki hosting platform>. That means that it can host multiple
136 wikis in a single installation. User identity is global to the installation,
137 and users are members of zero or more wikis. Silki supports various degrees of
138 openness in each wiki, from "guests can edit" to "members only".
139  
140 Silki is built with Modern Perl, including L<Catalyst>, L<Moose>, and
141 L<Fey::ORM>. One of my goals for Silki is to explore modern best practices in
142 creating web applications.
143  
144 =head2 Alpha Warning
145  
146 This software is still in the early stages of development, and should not be
147 considered stable. It is being released to "get it out there" and to let
148 people play with it.
149  
150 =head1 REQUIREMENTS
151  
152 Silki requires the following software:
153  
154 =over 4
155  
156 =item * Perl 5, Version 10 (5.10.0)
157  
158 =item * Postgres 8.4+
159  
160 Silki has been tested with Postgres 8.3 and 8.4. Silki uses the built-in
161 Postgres full text search engine, which was integrated into the Postgres core
162 in 8.3. It may be possible to use Silki with an earlier version of Postgres,
163 using the full text search included as a contrib module.
164  
165 Silki also uses the citext contrib module, which ships with Postgres 8.4. If
166 you are running Postgres 8.3 and you install citext yourself under your contrib
167 dir, you should be able to run Silki (I think).
168  
169 =back
170  
171 =head1 INSTALLATION
172  
173 Please see L<Silki::Manual::Admin> for details.
174  
175 =head1 BUGS
176  
177 Please report any bugs or feature requests to C<bug-silki@rt.cpan.org>, or
178 through the web interface at L<http://rt.cpan.org>. I will be notified, and
179 then you'll automatically be notified of progress on your bug as I make
180 changes.
181  
182 =head1 DONATIONS
183  
184 If you'd like to thank me for the work I've done on this module, please
185 consider making a "donation" to me via PayPal. I spend a lot of free time
186 creating free software, and would appreciate any support you'd care to offer.
187  
188 Please note that B<I am not suggesting that you must do this> in order for me
189 to continue working on this particular software. I will continue to do so,
190 inasmuch as I have in the past, for as long as it interests me.
191  
192 Similarly, a donation made in this way will probably not make me work on this
193 software much more, unless I get so many donations that I can consider working
194 on free software full time, which seems unlikely at best.
195  
196 To donate, log into PayPal and send money to autarch@urth.org or use the
197 button on this page: L<http://www.urth.org/~autarch/fs-donation.html>
198  
199 =head1 AUTHOR
200  
201 Dave Rolsky <autarch@urth.org>
202  
203 =head1 COPYRIGHT AND LICENSE
204  
205 This software is Copyright (c) 2011 by Dave Rolsky.
206  
207 This is free software, licensed under:
208  
209 The GNU Affero General Public License, Version 3, November 2007
210  
211 =cut
212  
213  
214 __END__