~ubuntu-branches/ubuntu/trusty/libconfig-inifiles-perl/trusty

« back to all changes in this revision

Viewing changes to lib/Config/IniFiles.pm

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2011-06-25 19:01:41 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20110625190141-rc96yk9k4un0ljfl
Tags: 2.68-1
* New upstream release.
* Update copyright file:
  + Add test, Expat licensed.
  + Update author: Shlomi Fish.
  + Quote licenses in License comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
use vars qw($VERSION);
4
4
 
5
 
$VERSION = '2.66';
 
5
$VERSION = '2.68';
6
6
 
7
7
require 5.004;
8
8
use strict;
1427
1427
sub _OutputParam {
1428
1428
    my ($self, $sect, $parm, $val, $ors, $end_comment, $output_cb) = @_;
1429
1429
 
1430
 
    if ((@$val <= 1) or $self->{nomultiline}) {
 
1430
    if (! @$val) {
 
1431
        # An empty variable - see:
 
1432
        # https://rt.cpan.org/Public/Bug/Display.html?id=68554
 
1433
        $output_cb->("$parm=");
 
1434
        $output_cb->("$ors");
 
1435
    }
 
1436
    elsif ((@$val == 1) or $self->{nomultiline}) {
1431
1437
        my $cnt = 0;
1432
1438
        foreach (@{$val}) {
1433
1439
            $cnt++;
1548
1554
 
1549
1555
Sets the comment for section $section to the lines contained in @comment.
1550
1556
 
1551
 
Each comment line will be prepended with the comment charcter (default
 
1557
Each comment line will be prepended with the comment character (default
1552
1558
is C<#>) if it doesn't already have a comment character (ie: if the
1553
1559
line does not start with whitespace followed by an allowed comment
1554
1560
character, default is C<#> and C<;>).