Config-YAML

 view release on metacpan or  search on metacpan

lib/Config/YAML.pm  view on Meta::CPAN

        $self->{$attr} = $newval;
        return;
    }
}

=head2 fold

Convenience method for folding multiple values into the config object
at once. Requires a hashref as its argument.

    $prefs{theme}  = param(theme);
    $prefs{format} = param(format);
    $prefs{sortby} = param(order);

    $c->fold(\%prefs);

    my $format = $c->get_format; # value matches that of param(format)

=cut

sub fold {
    my ($self, $data) = @_;
    # add check for HASHREF when strict mode is implemented
    @{$self}{keys %{$data}} = values %{$data};
}



( run in 0.478 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )