[Bps-public-commit] r12735 - pie/branches/named-params/lib/PIE
clkao at bestpractical.com
clkao at bestpractical.com
Thu May 29 11:14:14 EDT 2008
Author: clkao
Date: Thu May 29 11:13:56 2008
New Revision: 12735
Modified:
pie/branches/named-params/lib/PIE/Builder.pm
Log:
* when in known expression subclass, give the name as
fully-qualified.
* make the class PIE::Expression if the it's a call
(of which the name we don't know about.)
Modified: pie/branches/named-params/lib/PIE/Builder.pm
==============================================================================
--- pie/branches/named-params/lib/PIE/Builder.pm (original)
+++ pie/branches/named-params/lib/PIE/Builder.pm Thu May 29 11:13:56 2008
@@ -10,8 +10,13 @@
sub build_op_expression {
my ($self, $name, $args) = @_;
my $class = $name;
- $class->require;
- $class = "PIE::Expression" unless $class->can('meta');
+ $class = "PIE::Expression::$name" unless ($name =~ /^PIE::Expression/);
+ if ($class->can('meta')) {
+ $name = $class;
+ }
+ else {
+ $class = "PIE::Expression";
+ }
# XXX: in case of primitive-ops, we should only bulid the args we
# know about
More information about the Bps-public-commit
mailing list