source: xas/trunk/templates/service.pm @ 1f7fb7c704e27b311427c5e6e34839af55d3bd25

Revision 1f7fb7c704e27b311427c5e6e34839af55d3bd25, 2.1 KB checked in by Kevin L. Esteb <kevin@…>, 19 months ago (diff)

updated documentation

  • Property mode set to 100644
Line 
1package XAS::Apps::xxxx ;
2
3our $VERSION = '0.01';
4
5use XAS::Class
6  debug   => 0,
7  version => $VERSION,
8  base    => 'XAS::Lib::App::Service',
9  vars => {
10    SERVICE_NAME         => 'XAS_Test',
11    SERVICE_DISPLAY_NAME => 'XAS Text',
12    SERVICE_DESCRIPTION  => 'This is a test Perl service',
13  }
14;
15
16# ----------------------------------------------------------------------
17# Public Methods
18# ----------------------------------------------------------------------
19
20sub setup {
21    my $self = shift;
22
23}
24
25sub main {
26    my $self = shift;
27
28    $self->setup();
29
30    $self->log->info_msg('startup');
31
32
33
34    $self->service->register('');
35    $self->service->run();
36
37    $self->log->info_msg('shutdown');
38
39}
40
41sub options {
42    my $self = shift;
43
44    return {};
45
46}
47
48# ----------------------------------------------------------------------
49# Private Methods
50# ----------------------------------------------------------------------
51
521;
53
54__END__
55
56=head1 NAME
57
58XAS::Apps::xxxx - A class for the XAS environment
59
60=head1 SYNOPSIS
61
62 use XAS::Apps::xxxx ;
63
64 my $app = XAS::Apps::xxxx->new(
65     -throws   => 'changeme',
66     -priority => 'low',
67     -facility => 'systems',
68 );
69
70 exit $app->run();
71
72=head1 DESCRIPTION
73
74=head1 CONFIGURATION
75
76The configuration file uses the familiar Windows .ini format. It has the
77following stanza.
78
79 [xxxx: xxxx]
80 property = value
81
82Where the section header "xxxx:" may have addtional qualifiers and repeated
83as many times as needed. These qualifiers must be unique.
84
85The following properties may be used.
86
87=over 4
88
89=item B<property>
90
91=back
92
93=head1 METHODS
94
95=head2 setup
96
97This method will configure the process.
98
99=head2 main
100
101This method will start the processing.
102
103=head2 options
104
105This method provides these additonal cli options.
106
107=over 4
108
109=back
110
111=head1 SEE ALSO
112
113=over 4
114
115=item L<XAS|XAS>
116
117=back
118
119=head1 AUTHOR
120
121Kevin L. Esteb, E<lt>kevin@kesteb.usE<gt>
122
123=head1 COPYRIGHT AND LICENSE
124
125Copyright (c) 2012-2019 Kevin L. Esteb
126
127This is free software; you can redistribute it and/or modify it under
128the terms of the Artistic License 2.0. For details, see the full text
129of the license at http://www.perlfoundation.org/artistic_license_2_0.
130
131=cut
Note: See TracBrowser for help on using the repository browser.