Share

Config::IniFiles

Tracker: Patches

5 Get Section values as hash - ID: 2879834
Last Update: Tracker Item Submitted ( voj )

Maybe I missed something but I could not find a method to get all section
values as hash. It could be implemented the following way. It's no magic
but much more comfortable to use. Could you add this method please?

=head2 Values ( $section )

Returns all keys and values in a given section as hash.

=cut

sub Values {
my ($self, $section) = @_;
return unless defined $self and defined $section;
return map { $_ => $self->val($section,$_) } ( $self->Parameters(
$section ) );
}


Thanks and Greetings!


Jakob Voss ( voj ) - 2009-10-15 11:50

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.