Harald Jörg
Harald Jörg
Ah, I've seen that, too. The Core `stat` implies `$_` as its argument if none given, but `File::stat::stat` insists on exactly one argument. That `stat` complains 'Not enough arguments for...
I understand that scoping is a difficult topic. With PPI, it would be rather cumbersome - if at all possible - to process Object::Pad code, which right now is a...
The issue with your code example is that the "fields" `$red`, `$green`and `$blue` are just waste after the construction of the object, but can't be disposed of. This is not...
@leonerd: ```perl my $z = Real->new( re => 4, im => 3 ); ``` That should be an error. I could live with a sloppy implementation where `im` is silently...
> If we wanted `$im` to remove the `:writer`, we don't have a syntax for that. I could argue that the pure existence of the writer makes the class unsuitable...
The `NEWARGS` approach enables a case I have occasionally: A subclass with a restricted constructor. I'll take @thoughtstream's solution to my `Real` example, but drop the multi dispatch feature: ```ruby...
I suggest we take the current implementation of [Object::Pad](https://metacpan.org/pod/Object::Pad) as an example, since it clearly demonstrates how this could work nicely. For context, let me compare it to the hash-based...
Allowing several fields in a class to have the same name like this feels ... itchy. With Object::Pad an object can have several fields with the same name - iff...
> For now, I would suggest that duplicate names are forbidden until we hash this out. I agree (even if you drop "For now"). The benefits of using duplicate names...
Another thing to consider with regard to scoping: Currently Corinna has no way to make a field visible to sub-classes unless this field is at the same time made available...