initial import of catalyst.
[catagits/Catalyst-View-TT.git] / lib / Catalyst / Helper / View / TT.pm
1 package Catalyst::Helper::View::TT;
2
3 use strict;
4 use IO::File;
5
6 =head1 NAME
7
8 Catalyst::Helper::View::TT - Helper for TT Views
9
10 =head1 SYNOPSIS
11
12     bin/create view TT TT
13
14 =head1 DESCRIPTION
15
16 Helper for TT Views.
17
18 =head2 METHODS
19
20 =head3 mk_compclass
21
22 =cut
23
24 sub mk_compclass {
25     my ( $self, $helper ) = @_;
26     my $file  = $helper->{file};
27     my $class = $helper->{class};
28     my $comp  = IO::File->new("> $file") or die qq/Couldn't open "$file", "$!"/;
29     print $comp <<"EOF";
30 package $class;
31
32 use strict;
33 use base 'Catalyst::View::TT';
34
35 =head1 NAME
36
37 $class - TT View Component
38
39 =head1 SYNOPSIS
40
41     Very simple to use
42
43 =head1 DESCRIPTION
44
45 Very nice component.
46
47 =head1 AUTHOR
48
49 Clever guy
50
51 =head1 LICENSE
52
53 This library is free software . You can redistribute it and/or modify it under
54 the same terms as perl itself.
55
56 =cut
57
58 1;
59 EOF
60 }
61
62 =head1 SEE ALSO
63
64 L<Catalyst::Manual>, L<Catalyst::Test>, L<Catalyst::Request>,
65 L<Catalyst::Response>, L<Catalyst::Helper>
66
67 =head1 AUTHOR
68
69 Sebastian Riedel, C<sri@oook.de>
70
71 =head1 LICENSE
72
73 This library is free software . You can redistribute it and/or modify it under
74 the same terms as perl itself.
75
76 =cut
77
78 1;