From aa403b978860210fcbace7fcdf5830066f3e14e0 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 13 Oct 2018 02:17:44 -0400 Subject: import site content --- .../talks/extending_moose_yapc_na_2010/057.pl.html | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 static/talks/extending_moose_yapc_na_2010/057.pl.html (limited to 'static/talks/extending_moose_yapc_na_2010/057.pl.html') diff --git a/static/talks/extending_moose_yapc_na_2010/057.pl.html b/static/talks/extending_moose_yapc_na_2010/057.pl.html new file mode 100644 index 0000000..e7c7064 --- /dev/null +++ b/static/talks/extending_moose_yapc_na_2010/057.pl.html @@ -0,0 +1,46 @@ + + +057.pl + + + + +
+    package My::App;
+    use Moose;
+    use Foo;
+    
+    sub run {
+        my ($self, $cmd) = @_;
+        if (Foo->meta->has_command($cmd)) {
+            Foo->new->$cmd;
+        }
+        elsif ($cmd eq 'cmdlist') {
+            print join ', ', map { $_->name } Foo->meta->get_all_commands;
+        }
+    }
+
+
+
+
+
+ -- cgit v1.2.3-54-g00ecf