# New Ticket Created by David Warring
# Please include the string: [perl #131122]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=131122 >
Consider
class C {
has uint8 $.ff;
}
my $c = C.new(ff => 255);
say $c.perl;
say $c.
# New Ticket Created by Tobias Leich
# Please include the string: [perl #125129]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=125129 >
class Foo { has $.x is rw }; class Bar is Foo { }; my Foo $u .= new(:5x); say
$u.x; $u =
-objects.pod
Log Message:
---
define how "class attributes" are different from "attributes"
Commit: d88b5d99cfbd79388c0d135332390471c6e872fd
https://github.com/perl6/specs/commit/d88b5d99cfbd79388c0d135332390471c6e872fd
Author: Brent Laabs
Date: 201
On Tue Aug 12 14:17:20 2008, masak wrote:
> r30188:
> $ ./perl6 -e 'class A { my $.x = 7; say $.x }' # segfaults
> Lexical 'self' not found
> [...]
> Segmentation fault
>
> Not sure if the error message from Pugs is right either. Should it be
> looking for 'self' at this stage? What should the pro
# New Ticket Created by Lewis Wall
# Please include the string: [perl #76038]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=76038 >
$ perl6 -e 'class A {our $.x = 4}; say A.new.x'
Method 'x' not found for invocant of class
# New Ticket Created by Adrian White
# Please include the string: [perl #75504]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=75504 >
On Rakudo @ 1727ca53c7052fabe008748b70823bf8460ad656
In trying to write tests for Day 2
lue (>>>), Carl (>>), Jonathan (>):
>>> class A { has $.b; method x { $!b = "b" } }; A.new.x
>>>
>>> this works.
>>
>> Sure, but that doesn't create a class attribute, as was the topic of this
>> ticket. :) The 'has' declarator gives each object instance its own
>> attribute, whereas the ordinary '
Carl Mäsak via RT wrote:
On Sun Mar 21 14:33:26 2010, lue wrote:
class A { has $.b; method x { $!b = "b" } }; A.new.x
this works.
Sure, but that doesn't create a class attribute, as was the topic of this
ticket. :) The 'has' declarator gives each object instance its own attribute, wh
On Sun Mar 21 14:33:26 2010, lue wrote:
> class A { has $.b; method x { $!b = "b" } }; A.new.x
>
> this works.
Sure, but that doesn't create a class attribute, as was the topic of this
ticket. :) The 'has' declarator gives each object instance its own attribute,
whereas the ordinary 'my' declar
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #59120]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=59120 >
Rakudo r31286 does not like class attributes within roles.
$ ./perl6 -e
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #59118]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=59118 >
Rakudo r31286 doesn't seem to recognize class attributes w
> In src/objects.c:Parrot_add_attribute() there is the todo item:
This function was dead code and has been deleted in #45989
/ * TODO check if someone is trying to add attributes to a parent class
* while there are already child class attrs
*/
The checks are in add_parent on the class pmc.
The
# New Ticket Created by Paul Cochrane
# Please include the string: [perl #45993]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=45993 >
In src/objects.c:Parrot_add_attribute() there is the todo item:
/*
* TODO check if so
Jens Rieks <[EMAIL PROTECTED]> wrote:
> Does this mean that the attributes are shared per class, but the values
> are different between the instances?
Exactly.
> Maybe I misinterpreted it because my
> english is bad, but I assumed that "the same set of attributes" means that
> the "keys" as well
> Hmm, I thought attributes are per class and all instances are sharing them?
PDD 15 says:
Attribute
An attribute is a slot in an object that contains a
value, generally a PMC. (Containing non-PMCs leads to
interesting garbage collection issues at the momen
15 matches
Mail list logo