From: Robert 'phaylon' Sedlacek Date: Wed, 20 Jun 2012 19:21:25 +0000 (+0000) Subject: removed unnecessary 'file' structure level from Apt packages probe X-Git-Tag: v0.001_001~34 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1558d0ab645a5ba51417976efc0731b87f77eb96;p=scpubgit%2FSystem-Introspector.git removed unnecessary 'file' structure level from Apt packages probe --- diff --git a/lib/System/Introspector/Probe/Packages/Apt.pm b/lib/System/Introspector/Probe/Packages/Apt.pm index 5d5ecf2..615d7ae 100644 --- a/lib/System/Introspector/Probe/Packages/Apt.pm +++ b/lib/System/Introspector/Probe/Packages/Apt.pm @@ -83,10 +83,8 @@ sub _fetch_source_list { my ($self, $file) = @_; return transform_exceptions { return { - file => { - file_name => $file, - body => scalar(output_from_file $file), - }, + file_name => $file, + body => scalar(output_from_file $file), }; }; } diff --git a/t/packages-apt.t b/t/packages-apt.t index 74aa7d6..ec99aac 100644 --- a/t/packages-apt.t +++ b/t/packages-apt.t @@ -37,22 +37,18 @@ do { is_deeply $data->{sources}, { config => { sources_list => { - file => { - file_name => $source_list, - body => join "", map "$_\n", - "deb http://main.example.com foo", - "deb http://main.example.com bar", - }, + file_name => $source_list, + body => join "", map "$_\n", + "deb http://main.example.com foo", + "deb http://main.example.com bar", }, sources_list_dir => { files => { "other.list" => { - file => { - file_name => "$source_list_dir/other.list", - body => join "", map "$_\n", - "deb http://other.example.com foo", - "deb http://other.example.com bar", - }, + file_name => "$source_list_dir/other.list", + body => join "", map "$_\n", + "deb http://other.example.com foo", + "deb http://other.example.com bar", }, }, }