File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
modules/swagger-codegen/src/main/resources/perl Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ sub to_hash {
28
28
sub TO_JSON {
29
29
my $self = shift;
30
30
my $_data = {} ;
31
- foreach my $_key (keys $self->get_attribute_map) {
31
+ foreach my $_key (keys % { $self -> get_attribute_map } ) {
32
32
if (defined $self -> {$_key } ) {
33
33
$_data -> {$self -> get_attribute_map -> {$_key } } = $self->{ $_key } ;
34
34
}
@@ -40,7 +40,7 @@ sub TO_JSON {
40
40
sub from_hash {
41
41
my ($self , $hash ) = @_;
42
42
# loop through attributes and use swagger_types to deserialize the data
43
- while ( my ($_key , $_type ) = each $self -> get_swagger_types ) {
43
+ while ( my ($_key , $_type ) = each % { $self -> get_swagger_types } ) {
44
44
if ($_type =~ /^array\[/i) { # array
45
45
my $_subclass = substr($_type , 6, -1);
46
46
my @_array = ();
You can’t perform that action at this time.
0 commit comments