>>>>> "BD" == Brent Dax <[EMAIL PROTECTED]> writes:

  BD> Uri Guttman:
  BD> #   DC>         class Demo {
  BD> #   DC>                 my $foo;
  BD> #   DC>                 my $bar;
  BD> #
  BD> #   DC>                 method INIT ( $fooval, $barval) {
  BD> #   DC>                         $foo = $fooval;
  BD> #   DC>                         $bar = $barval;
  BD> #   DC>                 }
  BD> #
  BD> #   DC>         my $demo = Demo->new(bar=>'sheep', foo=>'fighter');

  BD>   method INIT($foo is outer, $bar is outer) {}
  BD>   #outer means don't declare a new one--use the one
  BD>   # that already exists in the 'outer' scope
  BD>   # ('extern' is another possible name)

  BD> or something like that?

but that doesn't bind to the strings 'bar' and 'foo' in the call
Demo->new(). there needs to be some form of keyword binding unless you
use positional params. as i said i recall something damian mentioned
somewhere about supporting both positional and named params. the syntax
shown above just doesn't do either correctly IMO. this will be worked
out by the usual gang soon enough.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Search or Offer Perl Jobs  --------------------------  http://jobs.perl.org

Reply via email to