summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Draklive/Loopback.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2010-08-04 14:11:03 +0000
committerOlivier Blin <oblin@mandriva.com>2010-08-04 14:11:03 +0000
commit7910fa4e1b96204fc725921d84e23561c178167b (patch)
tree19bc1c8135dae5f0a0a8d5df0f137b648bc1e589 /lib/MDV/Draklive/Loopback.pm
parent572eafb0a3300aa5930d152767754b0d9aa33e8a (diff)
downloaddrakiso-7910fa4e1b96204fc725921d84e23561c178167b.tar
drakiso-7910fa4e1b96204fc725921d84e23561c178167b.tar.gz
drakiso-7910fa4e1b96204fc725921d84e23561c178167b.tar.bz2
drakiso-7910fa4e1b96204fc725921d84e23561c178167b.tar.xz
drakiso-7910fa4e1b96204fc725921d84e23561c178167b.zip
allow loopback modules list to be returned by sub
Diffstat (limited to 'lib/MDV/Draklive/Loopback.pm')
-rw-r--r--lib/MDV/Draklive/Loopback.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/MDV/Draklive/Loopback.pm b/lib/MDV/Draklive/Loopback.pm
index ebcc8be..6fb592d 100644
--- a/lib/MDV/Draklive/Loopback.pm
+++ b/lib/MDV/Draklive/Loopback.pm
@@ -122,4 +122,13 @@ our %loop_types;
},
);
+sub get_loop_modules {
+ my ($live, $type) = @_;
+ my $modules = $loop_types{$_}{modules};
+ my $type = ref $modules;
+ return $type eq 'CODE' ? $modules->($live) :
+ $type eq 'ARRAY' ? @$modules :
+ ();
+}
+
1;