[svn:mod_parrot] r549 - mod_parrot/trunk/languages/perl6/lib

[email protected] Wed, 17 Dec 2008 13:58:02 -0800 (PST)
Newsgroups perl.cvs.mod_parrot
Message-ID <[email protected]>
Author: jhorwitz
Date: Wed Dec 17 13:58:01 2008
New Revision: 549

Modified:
   mod_parrot/trunk/languages/perl6/lib/mod_perl6.pm

Log:
refactor handler parsing to use list assignment from split


Modified: mod_parrot/trunk/languages/perl6/lib/mod_perl6.pm
==============================================================================
--- mod_parrot/trunk/languages/perl6/lib/mod_perl6.pm	(original)
+++ mod_parrot/trunk/languages/perl6/lib/mod_perl6.pm	Wed Dec 17 13:58:01 2008
@@ -116,12 +116,9 @@
     my $res;
 
     return $Apache::Const::DECLINED unless defined($handler);
+
     # resolve a method handler
-    # XXX fix when array lvalues work
-    #my ($class, $method) = split('.', $handler);
-    my @pieces = split('.', $handler);
-    my $class = @pieces[0];
-    my $method = @pieces[1];
+    my ($class, $method) = split('.', $handler);
     # i'd like to run this later with the other forms, but the calling
     # conventions are different for methods so just run it here
     if ($method) {