/[echolot]/tags/snapshot-2003-02-17/Echolot/Globals.pm
ViewVC logotype

Contents of /tags/snapshot-2003-02-17/Echolot/Globals.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations) (download)
Wed Jun 5 04:05:40 2002 UTC (10 years, 11 months ago) by weasel
Original Path: trunk/Echolot/Globals.pm
File size: 655 byte(s)
Initial Import
1 weasel 1 package Echolot::Globals;
2    
3     # (c) 2002 Peter Palfrader <peter@palfrader.org>
4     # $Id: Globals.pm,v 1.1 2002/06/05 04:05:40 weasel Exp $
5     #
6    
7     =pod
8    
9     =head1 Name
10    
11     Echolot::Globals - echolot global variables
12    
13     =head1 DESCRIPTION
14    
15     =cut
16    
17     use strict;
18     use warnings;
19     use Carp;
20    
21     my $GLOBALS;
22    
23     sub init {
24     my $hostname = `hostname`;
25     $hostname =~ /^([a-zA-Z0-9_-]*)$/;
26     $hostname = $1 || 'unknown';
27     $GLOBALS->{'hostname'} = $hostname;
28     $GLOBALS->{'storage'} = new Echolot::Storage::File ( datadir => Echolot::Config::get()->{'storage'}->{'File'}->{'basedir'} );
29     $GLOBALS->{'internalcounter'} = 1;
30     };
31    
32     sub get() {
33     return $GLOBALS;
34     };
35    
36     1;
37     # vim: set ts=4 shiftwidth=4:

  ViewVC Help
Powered by ViewVC 1.1.5