mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
Skeleton bin/pt-agent and lib/Percona/WebAPI.
This commit is contained in:
18
lib/Percona/WebAPI/Representation/HashRef.pm
Normal file
18
lib/Percona/WebAPI/Representation/HashRef.pm
Normal file
@@ -0,0 +1,18 @@
|
||||
package Percona::WebAPI::Representation::HashRef;
|
||||
|
||||
use Moose::Role;
|
||||
|
||||
sub as_hashref {
|
||||
my ($self) = @_;
|
||||
|
||||
# Copy the object into a new hashref.
|
||||
my $as_hashref = { %$self };
|
||||
|
||||
# Delete the links because they're just for client-side use
|
||||
# and the caller should be sending this object, not getting it.
|
||||
delete $as_hashref->{links};
|
||||
|
||||
return $as_hashref;
|
||||
}
|
||||
|
||||
1;
|
Reference in New Issue
Block a user