Re: Ignoring parameters
by Damian Conway other posts by this author
Jun 16 2005 3:14PM messages near this date
Re: Ignoring parameters
|
Re: Ignoring parameters
Patrick wrote:
> Somehow I read these as though the original poster was correct --
> i.e., one creates a class method for FooClass as either
>
> method greet(Class $class:) { say "Hello!"; }
Yes. That will work, but it's not the recommended solution.
> or
>
> method greet(FooClass $class:) { say "Hello!"; }
No. That needs to be:
method greet(FooClass ::class:) { say "Hello!"; }
(as implied by "takes a class as its invocant" in S12).
^^^^^
> Are the design documents out of date in this regard? If so, can
> someone provide a patch, if not, can someone confirm that the design
> documents are correct? (I just happened to be looking at class methods
> this past week, which is why I was a little surprised by Luke and
> Damian's answers... :-)
Both documents are correct, but S12 is correcter (as you would expect).
Damian
Thread:
Gaal Yahas
Luke Palmer
John Siracusa
Damian Conway
John Siracusa
David Storrs
Matthew Zimmerman
Juerd
Matthew Zimmerman
Damian Conway
David Storrs
Juerd
Kurt
Jonathan Scott Duff
Juerd
Juerd
Kurt
Juerd
John Siracusa
John Siracusa
Adam Kennedy
Juerd
John Siracusa
Adam Kennedy
John Siracusa
Darren Duncan
John Siracusa
Juerd
Juerd
Darren Duncan
John Siracusa
John Siracusa
John Siracusa
Damian Conway
Abhijit Mahabal
Damian Conway
Patrick R. Michaud
John Siracusa
Larry Wall
Gaal Yahas
Damian Conway
Patrick R. Michaud
Damian Conway
Patrick R. Michaud
Larry Wall
Patrick R. Michaud
"TSa (Thomas Sandlaß)"
Larry Wall
|