Shlomi Fish writes:
> On Tuesday 27 Apr 2010 15:51:07 Stevan Little wrote:
>> On Apr 27, 2010, at 3:36 AM, Shlomi Fish wrote:
>> >
>> > After merging XML-Grammar-Fiction and XML-Grammar-Screenplay, I have
>> > accumulated several questions about Moose, so I'd post each one in a
>> > separate post
On Tue, 27 Apr 2010, Shlomi Fish wrote:
Wouldn't it mean that perl will call the _build_paragraph_name of the sub-
class upon every instantiation of an object? I could be prematurely micro-
optimising in thinking that it matters, though.
Yes, you are prematurely optimizing.
As an aside, nami
On Tuesday 27 Apr 2010 18:54:06 Dave Rolsky wrote:
> On Tue, 27 Apr 2010, Shlomi Fish wrote:
> > [code]
> > has '_get_paragraph_tag_name' => (is => 'ro', default => "para");
> > [/code]
> >
> > And maybe specialise it further using «has '+_get_paragraph_tag_name'»,
> > but it seems like it would b
On Tue, 27 Apr 2010, Hans Dieter Pearcey wrote:
On Tue, 27 Apr 2010 10:54:06 -0500 (CDT), Dave Rolsky wrote:
has _paragraph_name => ( is => 'ro', builder => '_build_paragraph_name' );
Then in the parent class:
sub _build_paragraph_name {
die 'This method must be overridden in the c
- Original Message
> From: Dave Rolsky
> I would do this ...
> has _paragraph_name => ( is => 'ro', builder => '_build_paragraph_name' );
> Then in the parent class:
> sub _build_paragraph_name {
> die 'This method must be overridden in the child'
>}
Why not just define a "para
On Tue, 27 Apr 2010 10:54:06 -0500 (CDT), Dave Rolsky wrote:
> has _paragraph_name => ( is => 'ro', builder => '_build_paragraph_name' );
>
> Then in the parent class:
>
> sub _build_paragraph_name {
> die 'This method must be overridden in the child'
> }
Alternately, turn your pare
On Tue, 27 Apr 2010, Shlomi Fish wrote:
[code]
has '_get_paragraph_tag_name' => (is => 'ro', default => "para");
[/code]
And maybe specialise it further using «has '+_get_paragraph_tag_name'», but it
seems like it would be much more verbose.
I would do this ...
has _paragraph_name => ( is =
Hi all,
Here is my third question for the list: sometimes I want to have a subclass-
specific constant commonly implemented as a method in the subclass-hierarchy.
So I can do something like:
[code] # For demonstration - untested.
package XmlGenerator;
sub _gen_paragraph_tag
{
my $self
On Tuesday 27 Apr 2010 15:51:07 Stevan Little wrote:
> On Apr 27, 2010, at 3:36 AM, Shlomi Fish wrote:
> > Hi all!
> >
> > After merging XML-Grammar-Fiction and XML-Grammar-Screenplay, I have
> > accumulated several questions about Moose, so I'd post each one in a
> > separate
> > post to keep eac
On Apr 27, 2010, at 3:36 AM, Shlomi Fish wrote:
Hi all!
After merging XML-Grammar-Fiction and XML-Grammar-Screenplay, I have
accumulated several questions about Moose, so I'd post each one in a
separate
post to keep each thread single-topic. (I hope it's OK.)
The first one is how to impleme
Hi all,
When I run XML-Grammar-Fiction's tests, they succeed normally and die due to
uncaught exceptions under ./Build testcover:
[quote]
shlomi:$trunk/perl/modules/XML-Grammar-Fiction$ ./Build test
t/00-load.t ... 1/1 # Testing
XML::Grammar::Fiction 0.1.
Hi all!
After merging XML-Grammar-Fiction and XML-Grammar-Screenplay, I have
accumulated several questions about Moose, so I'd post each one in a separate
post to keep each thread single-topic. (I hope it's OK.)
The first one is how to implement a Class::Std/Perl 6-like walkmeth:
* http://blog
12 matches
Mail list logo