Clearquest
view release on metacpan or search on metacpan
lib/Clearquest.pm view on Meta::CPAN
# Strip trailing spaces
$value =~ s/\s+$//;
# Interpolate
$value = _GC_interpolate $value, %opts;
if ($opts{$key}) {
# If the key exists already then we have a case of multiple values for
# the same key. Since we support this we need to replace the scalar
# value with an array of values...
if (ref $opts{$key} eq "ARRAY") {
# It's already an array, just add to it!
push @{$opts{$key}}, $value;
} else {
# It's not an array so make it one
my @a;
push @a, $opts{$key};
push @a, $value;
$opts{$key} = \@a;
} # if
} else {
# It's a simple value
$opts{$key} = $value;
} # if
} # if
} # while
return %opts;
} # _GC_processFile
sub _GetConfig($) {
my ($filename) = @_;
my %opts;
open my $configFile, '<', $filename
or carp "Unable to open config file $filename";
%opts = _GC_processFile $configFile;
close $configFile;
return %opts;
} # _GetConfig
1;
=pod
=head1 DEPENDENCIES
=head2 Perl Modules
L<File::Basename|File::Basename>
=head1 BUGS AND LIMITATIONS
There are no known bugs in this module
Multithreading causes the database to be reopened for each thread. This can
cause performance issues if the database is large or if the database is
accessed by multiple threads.
Please report problems to Andrew DeFaria <Andrew@DeFaria.com>.
=head1 LICENSE AND COPYRIGHT
Copyright (C) 2007-2026 Andrew DeFaria <Andrew@DeFaria.com>
This program is free software; you can redistribute it and/or modify it
under the terms of the the Artistic License (2.0). You may obtain a
copy of the full license at:
L<http://www.perlfoundation.org/artistic_license_2_0>
Any use, modification, and distribution of the Standard or Modified
Versions is governed by this Artistic License. By using, modifying or
distributing the Package, you accept this license. Do not use, modify,
or distribute the Package, if you do not accept this license.
If your Modified Version has been derived from a Modified Version made
by someone else, you are strictly prohibited from removing any
copyright notice from that Modified Version.
Copyright Holder makes no, and expressly disclaims any, representation
or warranty, should the Package be used for any purpose. The liability
of the Copyright Holder is limited to the maximum extent permitted by
law.
=cut
( run in 2.341 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )