[protobuf-perl commit] r160 - trunk/perl/lib

0 views
Skip to first unread message

codesite...@google.com

unread,
Aug 1, 2008, 4:34:27 PM8/1/08
to protobuf-p...@googlegroups.com
Author: nothi...@woobling.org
Date: Fri Aug 1 13:30:43 2008
New Revision: 160

Modified:
trunk/perl/lib/Protobuf.pm

Log:
make class_name into an overridable attribute

Modified: trunk/perl/lib/Protobuf.pm
==============================================================================
--- trunk/perl/lib/Protobuf.pm (original)
+++ trunk/perl/lib/Protobuf.pm Fri Aug 1 13:30:43 2008
@@ -39,7 +39,9 @@
has 'full_name' => (is => 'rw', isa => 'Str');
has 'fields' => (is => 'rw', isa => 'ArrayRef[Protobuf::FieldDescriptor]');

-sub class_name {
+has class_name => ( is => 'rw', isa => 'Str', lazy_build => 1 );
+
+sub _build_class_name {
my $self = shift;
my $name = $self->full_name;

Reply all
Reply to author
Forward
0 new messages