# HG changeset patch # User sourcer # Date 1318367167 -10800 # Node ID 658a80d19d33c159f072fe5bc561dec5388f2aae # Parent df71a307ef9b269a32dff81e6dc1af63b71d2aea new constructor syntax diff -r df71a307ef9b -r 658a80d19d33 Lib/IMPL/lang.pm --- a/Lib/IMPL/lang.pm Wed Oct 12 00:04:13 2011 +0300 +++ b/Lib/IMPL/lang.pm Wed Oct 12 00:06:07 2011 +0300 @@ -39,7 +39,6 @@ &static &property &ctor - &base ) ], compare => [ @@ -120,7 +119,7 @@ } sub ctor(&;$) { - my ( $code, $base ) = @_; + my ( $code, %base ) = @_; no strict 'refs'; my $class = caller; @@ -128,15 +127,11 @@ *{"${class}::CTOR"} = $code; } - if (ref $base eq 'HASH') { - %{"${class}::CTOR"} = %$base; + if (%base) { + %{"${class}::CTOR"} = %base; } } -sub base($) { - return shift; -} - sub equals { if (defined $_[0]) { return 0 if (not defined $_[1]);