/usr/share/perl5/Weather/Com/Object.pm is in libweather-com-perl 0.5.3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | package Weather::Com::Object;
use 5.006;
use strict;
use warnings;
use Carp;
#--------------------------------------------------------------------
# Define some globals
#--------------------------------------------------------------------
our $VERSION = sprintf "%d.%03d", q$Revision: 1.3 $ =~ /(\d+)/g;
my %LH = (); # our language handles
#------------------------------------------------------------------------
# Constructor
#------------------------------------------------------------------------
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = {};
my %parameters;
# parameters provided by new method
if ( ref( $_[0] ) eq "HASH" ) {
%parameters = %{ $_[0] };
} else {
%parameters = @_;
}
$self = bless( $self, $class );
# creating the SUPER instance
$self->{ARGS} = \%parameters;
if ( $parameters{lang} ) {
$self->{LANGUAGE} = $parameters{lang};
} else {
$self->{LANGUAGE} = 'en_US';
}
return $self;
} # end new()
#------------------------------------------------------------------------
# update barometric data
#------------------------------------------------------------------------
sub update {
my $self = shift;
return 1;
}
#------------------------------------------------------------------------
# Get a language handle
#------------------------------------------------------------------------
sub get_language_handle {
my $self = shift;
my $lang = shift || $self->{LANGUAGE};
# check if we already have an open handle
unless (defined($LH{$lang})) {
$LH{$lang} = Weather::Com::L10N->get_handle($lang)
or croak ("Language?");
}
# return language handle
return $LH{$lang};
}
1;
|