Skip to content

Commit

Permalink
carp() when nodes() is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
gbxyz committed Oct 28, 2024
1 parent 08756c6 commit 6851a81
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Net/RDAP/JCard.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package Net::RDAP::JCard;
use Carp;
use Net::RDAP::JCard::Property;
use Net::RDAP::JCard::Address;
use strict;
Expand Down Expand Up @@ -59,14 +60,16 @@ case-insensitively).

sub properties {
my ($self, $type) = @_;

return grep { !$type || uc($type) eq uc($_->type) } @{$self->{properties}};
}

#
# DEPRECATED
#
sub nodes { shift->properties(@_) }
sub nodes {
carp("Warning: Net::RDAP::JCard::nodes() has been deprecated and will be removed in a future release.");
return shift->properties(@_);
}

=pod
Expand Down

0 comments on commit 6851a81

Please sign in to comment.