3 |
use warnings; |
use warnings; |
4 |
use strict; |
use strict; |
5 |
|
|
6 |
use base qw/WebPAC::Common Class::Accessor/; |
use base qw/WebPAC::Common WebPAC::Output Class::Accessor/; |
7 |
__PACKAGE__->mk_accessors(qw(path)); |
__PACKAGE__->mk_accessors(qw(path)); |
8 |
|
|
9 |
#use Encode qw/from_to/; |
#use Encode qw/from_to/; |
82 |
|
|
83 |
$log->debug("id: $id ds = ",dump($ds)); |
$log->debug("id: $id ds = ",dump($ds)); |
84 |
|
|
85 |
my $item; |
push @{ $self->{_data} }, $self->ds_to_hash( $ds, 'display' ); |
|
|
|
|
foreach my $t ( keys %$ds ) { |
|
|
my $name = lc($t); |
|
|
$name =~ s/\W+/_/g; |
|
|
|
|
|
# FIXME get rid of non hash values in data_structure for consistency? |
|
|
next unless ref($ds->{$t}) eq 'HASH'; |
|
|
|
|
|
if ( defined( $ds->{$t}->{display} ) ) { |
|
|
$item->{$name} = $ds->{$t}->{display}; |
|
|
} |
|
|
} |
|
|
|
|
|
push @{ $self->{_data} }, $item; |
|
86 |
|
|
87 |
return 1; |
return 1; |
88 |
} |
} |