removed unnecessary 'file' structure level from Apt packages probe
Robert 'phaylon' Sedlacek [Wed, 20 Jun 2012 19:21:25 +0000 (19:21 +0000)]
lib/System/Introspector/Probe/Packages/Apt.pm
t/packages-apt.t

index 5d5ecf2..615d7ae 100644 (file)
@@ -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),
         };
     };
 }
index 74aa7d6..ec99aac 100644 (file)
@@ -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",
                     },
                 },
             }