Config-Properties
view release on metacpan or search on metacpan
1.70 Apr 22, 2009
- Solve bug in testing file 6_sorted.t (bug report and patch by
Ian Malpass)
1.69 Dec 1, 2008
- Delete temporal files created on tests (bug report by
Andreas Koenig)
1.68 Oct 27, 2007
- the regular expresion used to detect unicode BOM was not correct
- work around unicode bug in perl 5.6.0
- require perl 5.6.0 in Makefile.PL
- test pods
1.67 Aug 20, 2007
- splitToTree was not handling defaults properly (bug report
and patch submitted by Filip Chodounsky)
1.66 Sep 8 2006
- this module is very stable now, use 1.x version numbers to
reflect it.
Fandiño <sfandino@yahoo.com>
0.42 Tue Apr 15 2003
- Added 'setValidator', 'getValidator' and 'validator'
methods
- Added 'validate' method to perform validations on
property/value pairs
- Added 'fail' method to report errors
- Added 'line_number' method
- Use Carp to report interface errors
- Reworked unescape to handle unicode sequences
- Reworked parsing regexp to support escaping [:= ] on
property names
- Escape conflicting chars when writing
- Tests changed to use to Test::More
- Added some tests
0.41 Tue Jul 10 00:00:00 2002
- Fixed value checks in most methods that incorrectly treated the
value '0' or the empty string as an undefined value. I could not
contact the original author in any way (tried 3 email addresses
lib/Config/Properties.pm view on Meta::CPAN
my $line = $$bin;
$$bin = '';
return $line
}
undef;
}
# process_line() - read and parse a line from the properties file.
# this is to workaround a bug in perl 5.6.0 related to unicode
my $bomre = eval(q< qr/^\\x{FEFF}/ >) || qr//;
sub process_line {
my ($self, $file) = @_;
my $line = $self->read_line($file);
defined $line or return undef;
# remove utf8 byte order mark
my $ln = $self->{last_line_number};
$line =~ s/$bomre// if $ln < 2;
t/1_parse.t view on Meta::CPAN
is ($cfg->getProperty("!nocmt"), 'good', 'no comment 2');
is ($cfg->getProperty("lineend1"), 'here', 'line end 1');
is ($cfg->getProperty("lineend2"), 'here', 'line end 2');
is ($cfg->getProperty("\\\\machinename\\folder"),
"\\\\windows\\ style\\path",
'windows style path');
is ($cfg->getProperty("cmd3"),
'/usr/share/Artemis/bin/loki -vip 10.51.100.120 -file f3058 -it 10 -repeat 100000000 -proc read -vdir /vol1 -useGateway 172.16.254.254 %ETH%',
'derrick bug');
is ($cfg->getProperty("unicode"), "he\x{0113}llo", "unicode unencode");
is ($cfg->getProperties->{foo}, 'one', 'getProperties one');
my %props=$cfg->properties;
is ($props{foo}, 'one', 'properties one');
__DATA__
# hello
foo=one
Bar : maybe one\none\tone\r
t/1_parse.t view on Meta::CPAN
less= who said:\tless ???
cra\n\=\:\ \\z'y' jump
\#nocmt = good
#nocmt = bad
\!nocmt = good
!nocmt = bad
unicode = he\u0113llo
lineend1=here
lineend2=here
cmd3=/usr/share/Artemis/bin/loki -vip 10.51.100.120 -file f3058 -it 10 -repeat 100000000 -proc read -vdir /vol1 -useGateway 172.16.254.254 %ETH%
\\\\machinename\\folder = \\\\windows\\ style\\path
( run in 0.372 second using v1.01-cache-2.11-cpan-88abd93f124 )