/[webpac2]/Webpacus/lib/Webpacus.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /Webpacus/lib/Webpacus.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 348 - (hide annotations)
Sat Jan 7 17:34:16 2006 UTC (18 years, 4 months ago) by dpavlin
File size: 1598 byte(s)
 r360@llin:  dpavlin | 2006-01-07 17:38:48 +0100
 use Encode instead of Text::Iconv

1 dpavlin 83 package Webpacus;
2    
3     use strict;
4     use warnings;
5    
6     #
7     # Set flags and add plugins for the application
8     #
9     # -Debug: activates the debug mode for very useful log messages
10     # Static::Simple: will serve static files from the applications root directory
11     #
12 dpavlin 93 use Catalyst qw/-Debug
13     Prototype
14     Config::YAML
15 dpavlin 100 FillInForm
16 dpavlin 207 SubRequest
17 dpavlin 228 Static::Simple
18 dpavlin 348 StackTrace
19 dpavlin 93 /;
20 dpavlin 97 # FormValidator
21 dpavlin 83
22 dpavlin 348 our $VERSION = '0.29-dev';
23 dpavlin 83
24     #
25     # Configure the application
26     #
27 dpavlin 93 __PACKAGE__->config(
28     name => 'Webpacus',
29     config_file => 'config.yml',
30     );
31 dpavlin 83
32     #
33     # Start the application
34     #
35     __PACKAGE__->setup;
36    
37     =head1 NAME
38    
39     Webpacus - Catalyst based application
40    
41     =head1 SYNOPSIS
42    
43     script/webpacus_server.pl
44    
45     =head1 DESCRIPTION
46    
47     Catalyst based application.
48    
49     =head1 METHODS
50    
51     =over 4
52    
53     =item default
54    
55     =cut
56    
57     sub default : Private {
58     my ( $self, $c ) = @_;
59     $c->stash->{template} = 'index.tt';
60     }
61    
62     =item end
63    
64     =cut
65    
66     sub end : Private {
67     my ( $self, $c ) = @_;
68    
69 dpavlin 139 $c->stash->{webpacus_version} = $VERSION;
70    
71 dpavlin 228 if ($c->response->body) {
72     $c->log->debug("at end body exists, we won't touch it!");
73     } else {
74 dpavlin 270 $c->fillform( $c->req->params );
75 dpavlin 97
76 dpavlin 270 # Forward to View unless response body is already defined
77     $c->forward('View::TT');
78 dpavlin 100
79 dpavlin 270 $c->response->{body} =~ s#\Qnew Ajax.Autocompleter(\E#new WebPAC.Suggest(#gs;
80     $c->response->{body} =~ s#\Qnew Ajax.Updater(\E#new WebPAC.Updater(#gs;
81    
82     # $c->log->debug( $c->response->body );
83 dpavlin 228 }
84 dpavlin 97
85 dpavlin 83 }
86    
87     =back
88    
89     =head1 AUTHOR
90    
91 dpavlin 203 Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>
92 dpavlin 83
93     =head1 LICENSE
94    
95     This library is free software, you can redistribute it and/or modify
96     it under the same terms as Perl itself.
97    
98     =cut
99    
100     1;

  ViewVC Help
Powered by ViewVC 1.1.26