Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #5 from moritz/attribute-names

Use the same name for attribute and accessor
  • Loading branch information...
commit a188fdcd679bb5f4385738ae7b9c1f725db7bed5 2 parents 200ad64 + 68a9175
@arhuman arhuman authored
View
6 lib/Net/Whois/Object/AsSet.pm
@@ -101,7 +101,7 @@ of AS Numbers, or other as-set names.
sub members {
my ( $self, $member ) = @_;
- return $self->_multiple_attribute_setget( 'member', $member );
+ return $self->_multiple_attribute_setget( 'members', $member );
}
=head2 B<mbrs_by_ref( [$mbr] )>
@@ -127,7 +127,7 @@ defined explicitly by the members attribute.
sub mbrs_by_ref {
my ( $self, $mbr ) = @_;
- return $self->_multiple_attribute_setget( 'mbr', $mbr );
+ return $self->_multiple_attribute_setget( 'mbrs_by_ref', $mbr );
}
=head2 B<remarks( [$remark] )>
@@ -224,7 +224,7 @@ object will be able to change details.
sub mnt_by {
my ( $self, $mnt ) = @_;
- return $self->_multiple_attribute_setget( 'mnt', $mnt );
+ return $self->_multiple_attribute_setget( 'mnt_by', $mnt );
}
=head2 B<changed( [$changed] )>
View
4 lib/Net/Whois/Object/AutNum.pm
@@ -255,7 +255,7 @@ include a URL or email address.
sub remarks {
my ( $self, $remark ) = @_;
- return $self->_multiple_attribute_setget( 'remark', $remark );
+ return $self->_multiple_attribute_setget( 'remarks', $remark );
}
=head2 B<admin_c( [$contact] )>
@@ -339,7 +339,7 @@ always return the current mnt_routes array.
sub mnt_routes {
my ( $self, $mnt_routes ) = @_;
- return $self->_multiple_attribute_setget( 'mnt_route', $mnt_route );
+ return $self->_multiple_attribute_setget( 'mnt_routes', $mnt_route );
}
=head2 B<mnt_by( [$mnt_by] )>
View
2  lib/Net/Whois/Object/Domain.pm
@@ -200,7 +200,7 @@ for DNSSEC (short for DNS Security Extensions)
sub ds_rdata {
my ( $self, $server ) = @_;
- return $self->_multiple_attribute_setget( 'ds_data', $server );
+ return $self->_multiple_attribute_setget( 'ds_rdata', $server );
}
=head2 B<sub_dom( [$dom] )>
View
4 lib/Net/Whois/Object/InetNum.pm
@@ -302,7 +302,7 @@ object.
sub mnt_routes {
my ( $self, $mnt_route ) = @_;
- return $self->_multiple_attribute_setget( 'mnt_route', $mnt_route );
+ return $self->_multiple_attribute_setget( 'mnt_routes', $mnt_route );
}
=head2 B<mnt_domains( [$mnt_domain] )>
@@ -320,7 +320,7 @@ object.
sub mnt_domains {
my ( $self, $mnt_domain ) = @_;
- return $self->_multiple_attribute_setget( 'mnt_domain', $mnt_domain );
+ return $self->_multiple_attribute_setget( 'mnt_domains', $mnt_domain );
}
=head2 B<changed( [$changed] )>
View
4 t/common.pl
@@ -42,3 +42,7 @@
ok ($object->attribute_is($a, 'single') or $object->attribute_is($a, 'multiple'), "$a is either single or multiple");
ok ($object->attribute_is($a, 'single') != $object->attribute_is($a, 'multiple'), "$a can't be both single".$object->attribute_is($a,'single')." and multi".$object->attribute_is($a,'multiple'));
}
+
+# check that the object can be dumped
+# this catches spelling errors in attribute accessors
+ok $object->dump, 'can dump object';
Please sign in to comment.
Something went wrong with that request. Please try again.