[Catalyst-commits] r10683 -
Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst
dhoss at dev.catalyst.perl.org
dhoss at dev.catalyst.perl.org
Fri Jun 26 19:46:18 GMT 2009
Author: dhoss
Date: 2009-06-26 19:46:17 +0000 (Fri, 26 Jun 2009)
New Revision: 10683
Modified:
Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/ScriptRunner.pm
Log:
updated so that if their class doesn't load, we use ours.
Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/ScriptRunner.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/ScriptRunner.pm 2009-06-26 19:45:45 UTC (rev 10682)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/ScriptRunner.pm 2009-06-26 19:46:17 UTC (rev 10683)
@@ -4,7 +4,12 @@
sub run {
my ($self, $class, $scriptclass) = @_;
my $classtoload = "${class}::Script::$scriptclass";
- Class::MOP::load_class($classtoload);
- $classtoload->new_with_options->run;
+
+ if ( Class::MOP::load_class($classtoload) ) {
+ $classtoload->new_with_options->run;
+ } else {
+ $classtoload = "Catalyst::Script::$scriptclass";
+ $classtoload->new_with_options->run;
+ }
}
1;
More information about the Catalyst-commits
mailing list