| 1 | package Spreadsheet::Reader::ExcelXML::XMLReader::PositionStyles; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 20 | our $AUTHORITY = 'cpan:JANDREW'; | |||||||||||||||||||||||||||||||||||||||||
| 3 | 20 | ▶ | use version; our $VERSION = version->declare('v0.16.8'); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | ###LogSD warn "You uncovered internal logging statements for Spreadsheet::Reader::ExcelXML::XMLReader::PositionStyles-$VERSION"; | ||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 20 | ▶ | use 5.010; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 20 | ▶ | use Moose::Role; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 20 | requires qw( | |||||||||||||||||||||||||||||||||||||||||
| 9 | get_defined_conversion start_the_file_over close_the_file | ||||||||||||||||||||||||||||||||||||||||||
| 10 | advance_element_position parse_element set_defined_excel_formats | ||||||||||||||||||||||||||||||||||||||||||
| 11 | current_named_node set_error squash_node | ||||||||||||||||||||||||||||||||||||||||||
| 12 | good_load | ||||||||||||||||||||||||||||||||||||||||||
| 13 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 14 | 20 | ▶ | use Types::Standard qw( | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 15 | Bool ArrayRef Int is_HashRef is_Int | ||||||||||||||||||||||||||||||||||||||||||
| 16 | 20 | ); | |||||||||||||||||||||||||||||||||||||||||
| 17 | 20 | ▶ | use Carp qw( confess ); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 18 | 20 | ▶ | use Clone qw( clone ); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | #########1 Dispatch Tables & Package Variables 5#########6#########7#########8#########9 | ||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||
| 22 | 20 | my $element_lookup ={ | |||||||||||||||||||||||||||||||||||||||||
| 23 | numFmts => 'numFmt', | ||||||||||||||||||||||||||||||||||||||||||
| 24 | fonts => 'font', | ||||||||||||||||||||||||||||||||||||||||||
| 25 | borders => 'border', | ||||||||||||||||||||||||||||||||||||||||||
| 26 | fills => 'fill', | ||||||||||||||||||||||||||||||||||||||||||
| 27 | cellStyleXfs => 'xf', | ||||||||||||||||||||||||||||||||||||||||||
| 28 | cellXfs => 'xf', | ||||||||||||||||||||||||||||||||||||||||||
| 29 | cellStyles => 'cellStyle', | ||||||||||||||||||||||||||||||||||||||||||
| 30 | tableStyles => 'tableStyle', | ||||||||||||||||||||||||||||||||||||||||||
| 31 | dxfs => 'dxf', | ||||||||||||||||||||||||||||||||||||||||||
| 32 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||
| 34 | 20 | my $key_translations ={ | |||||||||||||||||||||||||||||||||||||||||
| 35 | fontId => 'fonts', | ||||||||||||||||||||||||||||||||||||||||||
| 36 | borderId => 'borders', | ||||||||||||||||||||||||||||||||||||||||||
| 37 | fillId => 'fills', | ||||||||||||||||||||||||||||||||||||||||||
| 38 | xfId => 'cellStyles', | ||||||||||||||||||||||||||||||||||||||||||
| 39 | dxfId => 'dxfs', | ||||||||||||||||||||||||||||||||||||||||||
| 40 | #~ pivotButton => 'pivotButton', | ||||||||||||||||||||||||||||||||||||||||||
| 41 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||
| 43 | 20 | my $cell_attributes ={ | |||||||||||||||||||||||||||||||||||||||||
| 44 | fontId => 'cell_font', | ||||||||||||||||||||||||||||||||||||||||||
| 45 | borderId => 'cell_border', | ||||||||||||||||||||||||||||||||||||||||||
| 46 | fillId => 'cell_fill', | ||||||||||||||||||||||||||||||||||||||||||
| 47 | xfId => 'cell_style', | ||||||||||||||||||||||||||||||||||||||||||
| 48 | numFmtId => 'cell_coercion', | ||||||||||||||||||||||||||||||||||||||||||
| 49 | alignment => 'cell_alignment', | ||||||||||||||||||||||||||||||||||||||||||
| 50 | numFmts => 'cell_coercion', | ||||||||||||||||||||||||||||||||||||||||||
| 51 | fonts => 'cell_font', | ||||||||||||||||||||||||||||||||||||||||||
| 52 | borders => 'cell_border', | ||||||||||||||||||||||||||||||||||||||||||
| 53 | fills => 'cell_fill', | ||||||||||||||||||||||||||||||||||||||||||
| 54 | dxfId => 'table_style', | ||||||||||||||||||||||||||||||||||||||||||
| 55 | cellStyleXfs => 'cellStyleXfs', | ||||||||||||||||||||||||||||||||||||||||||
| 56 | cellXfs => 'cellXfs', | ||||||||||||||||||||||||||||||||||||||||||
| 57 | cellStyles => 'cell_style', | ||||||||||||||||||||||||||||||||||||||||||
| 58 | tableStyles => 'tableStyle', | ||||||||||||||||||||||||||||||||||||||||||
| 59 | pivotButton => 'pivotButton', | ||||||||||||||||||||||||||||||||||||||||||
| 60 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||
| 62 | 20 | my $xml_from_cell ={ | |||||||||||||||||||||||||||||||||||||||||
| 63 | cell_font => 'fontId', | ||||||||||||||||||||||||||||||||||||||||||
| 64 | cell_border => 'borderId', | ||||||||||||||||||||||||||||||||||||||||||
| 65 | cell_fill => 'fillId', | ||||||||||||||||||||||||||||||||||||||||||
| 66 | cell_style => 'xfId', | ||||||||||||||||||||||||||||||||||||||||||
| 67 | cell_coercion => 'numFmtId', | ||||||||||||||||||||||||||||||||||||||||||
| 68 | cell_alignment => 'alignment', | ||||||||||||||||||||||||||||||||||||||||||
| 69 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||
| 71 | #########1 Public Attributes 3#########4#########5#########6#########7#########8#########9 | ||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||
| 73 | 20 | has cache_positions =>( | |||||||||||||||||||||||||||||||||||||||||
| 74 | isa => Bool, | ||||||||||||||||||||||||||||||||||||||||||
| 75 | reader => 'should_cache_positions', | ||||||||||||||||||||||||||||||||||||||||||
| 76 | default => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 77 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||
| 79 | #########1 Public Methods 3#########4#########5#########6#########7#########8#########9 | ||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||
| 81 | 297 | ▶ | sub get_format{ | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_format: called CC=9 SCAR=22.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 82 | 297 | my( $self, $position, $header, $exclude_header ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 83 | 297 | ▶ | my $xml_target_header = $header ? $header : '';#$xml_from_cell->{$header} | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 84 | 297 | ▶ | my $xml_exclude_header = $exclude_header ? $xml_from_cell->{$exclude_header} : ''; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 85 | ###LogSD my $phone = Log::Shiras::Telephone->new( name_space => | ||||||||||||||||||||||||||||||||||||||||||
| 86 | ###LogSD $self->get_all_space . '::get_format', ); | ||||||||||||||||||||||||||||||||||||||||||
| 87 | ###LogSD $phone->talk( level => 'info', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 88 | ###LogSD "Get defined formats at position: $position", | ||||||||||||||||||||||||||||||||||||||||||
| 89 | ###LogSD ( $header ? "Returning only the values for header: $header - $xml_target_header" : '' ), | ||||||||||||||||||||||||||||||||||||||||||
| 90 | ###LogSD ( $exclude_header ? "..excluding the values for header: $exclude_header - $xml_exclude_header" : '' ) , ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||||||
| 92 | # Check for stored value - when caching implemented | ||||||||||||||||||||||||||||||||||||||||||
| 93 | 297 | my $already_got_it = 0; | |||||||||||||||||||||||||||||||||||||||||
| 94 | 297 | ▶ | if( $self->_has_styles_positions ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 95 | 288 | ▶ | if( $position > $self->_get_styles_count - 1 ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | $self->set_error( "Requested styles position is out of range for this workbook" ); | |||||||||||||||||||||||||||||||||||||||||
| 97 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||
| 98 | } | ||||||||||||||||||||||||||||||||||||||||||
| 99 | 288 | my $target_ref = clone( $self->_get_s_position( $position ) ); | |||||||||||||||||||||||||||||||||||||||||
| 100 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 101 | ###LogSD "The complete cached style is:", $target_ref, ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 102 | 288 | ▶ | if( $header ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 103 | 140 | ▶ | $target_ref = $target_ref->{$header} ? { $header => $target_ref->{$header} } : undef; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 104 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 105 | ###LogSD "The cached style with target header -$header- only is:", $target_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 106 | }elsif( $exclude_header ){ | ||||||||||||||||||||||||||||||||||||||||||
| 107 | 12 | delete $target_ref->{$exclude_header}; | |||||||||||||||||||||||||||||||||||||||||
| 108 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 109 | ###LogSD "The cached style with exclude header -$exclude_header- removed is:", $target_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||||||
| 111 | 288 | return $target_ref; | |||||||||||||||||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||||||||||||||||
| 114 | # pull the data the long (hard and slow) way | ||||||||||||||||||||||||||||||||||||||||||
| 115 | # Pull the base ref | ||||||||||||||||||||||||||||||||||||||||||
| 116 | 9 | my( $success, $base_ref ) = $self->_get_header_and_value( 'cellXfs', $position ); | |||||||||||||||||||||||||||||||||||||||||
| 117 | 9 | ▶ | if( !$success ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | confess "Unable to pull position -$position- of the base stored formats (cellXfs)"; | |||||||||||||||||||||||||||||||||||||||||
| 119 | } | ||||||||||||||||||||||||||||||||||||||||||
| 120 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 121 | ###LogSD "Updated base ref:", $base_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||||||||||||||||
| 123 | 9 | my $built_ref = $self->_build_cell_style_formats( $base_ref, $xml_target_header, $xml_exclude_header ); | |||||||||||||||||||||||||||||||||||||||||
| 124 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 125 | ###LogSD "Updated built ref:", $built_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 126 | 9 | return $built_ref; | |||||||||||||||||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||||||
| 129 | 8 | ▶ | sub get_default_format{ | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_default_format: called CC=9 SCAR=23.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 130 | 8 | my( $self, $header, $exclude_header ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 131 | 8 | my $position = 0; | |||||||||||||||||||||||||||||||||||||||||
| 132 | 8 | ▶ | my $xml_target_header = $header ? $xml_from_cell->{$header} : ''; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 133 | 8 | ▶ | my $xml_exclude_header = $exclude_header ? $xml_from_cell->{$exclude_header} : ''; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 134 | ###LogSD my $phone = Log::Shiras::Telephone->new( name_space => | ||||||||||||||||||||||||||||||||||||||||||
| 135 | ###LogSD $self->get_all_space . '::get_default_format', ); | ||||||||||||||||||||||||||||||||||||||||||
| 136 | ###LogSD $phone->talk( level => 'info', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 137 | ###LogSD "Get defined formats at default position: $position", | ||||||||||||||||||||||||||||||||||||||||||
| 138 | ###LogSD ( $header ? "Returning only the values for header: $header - $xml_target_header" : '' ), | ||||||||||||||||||||||||||||||||||||||||||
| 139 | ###LogSD ( $exclude_header ? "..excluding the values for header: $exclude_header - $xml_exclude_header" : '' ) , ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||||||||||||
| 141 | # Check for stored value - when caching implemented | ||||||||||||||||||||||||||||||||||||||||||
| 142 | 8 | my $already_got_it = 0; | |||||||||||||||||||||||||||||||||||||||||
| 143 | 8 | ▶ | if( $self->_has_generic_styles_positions ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 144 | 5 | ▶ | if( $position > $self->_get_generic_styles_count - 1 ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | $self->set_error( "Requested default styles position is out of range for this workbook" ); | |||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||||||||||||
| 148 | 5 | my $target_ref = $self->_get_gs_position( $position ); | |||||||||||||||||||||||||||||||||||||||||
| 149 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 150 | ###LogSD "The complete cached style is:", $target_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 151 | 5 | ▶ | if( $header ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 152 | 2 | ▶ | $target_ref = $target_ref->{$header} ? { $header => $target_ref->{$header} } : undef; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 153 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 154 | ###LogSD "The cached style with target header only is:", $target_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 155 | }elsif( $exclude_header ){ | ||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | delete $target_ref->{$exclude_header}; | |||||||||||||||||||||||||||||||||||||||||
| 157 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 158 | ###LogSD "The cached style with exclude header -$exclude_header- removed is:", $target_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 159 | } | ||||||||||||||||||||||||||||||||||||||||||
| 160 | 5 | return $target_ref; | |||||||||||||||||||||||||||||||||||||||||
| 161 | } | ||||||||||||||||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||||||||||||||||
| 163 | # pull the data the long (hard and slow) way | ||||||||||||||||||||||||||||||||||||||||||
| 164 | # Pull the base ref | ||||||||||||||||||||||||||||||||||||||||||
| 165 | 3 | my( $key, $base_ref ) = $self->_get_header_and_value( 'cellStyleXfs', $position ); | |||||||||||||||||||||||||||||||||||||||||
| 166 | 3 | ▶ | if( !$key ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 167 | 0 | confess "Unable to pull the default position (0) for stored formats (cellStyleXfs)"; | |||||||||||||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||||||||||||
| 169 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 170 | ###LogSD "Received key -$key- with value:", $base_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||
| 172 | 3 | my $built_ref = $self->_build_cell_style_formats( $base_ref, $xml_target_header, $xml_exclude_header ); | |||||||||||||||||||||||||||||||||||||||||
| 173 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 174 | ###LogSD "Updated built ref:", $built_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 175 | 3 | return $built_ref; | |||||||||||||||||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||
| 178 | 26 | ▶ | sub load_unique_bits{ | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
load_unique_bits: called CC=21 SCAR=31.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 179 | 26 | my( $self, ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 180 | ###LogSD my $phone = Log::Shiras::Telephone->new( name_space => | ||||||||||||||||||||||||||||||||||||||||||
| 181 | ###LogSD $self->get_all_space . '::load_unique_bits', ); | ||||||||||||||||||||||||||||||||||||||||||
| 182 | #~ ###LogSD $phone->talk( level => 'trace', message => [ 'self:', $self ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||||||||||||||||
| 184 | # Advance to the styleSheet node | ||||||||||||||||||||||||||||||||||||||||||
| 185 | 26 | my( $result, $node_name, $node_level, $result_ref ); | |||||||||||||||||||||||||||||||||||||||||
| 186 | 26 | my $current_node = $self->current_node_parsed; | |||||||||||||||||||||||||||||||||||||||||
| 187 | ###LogSD $phone->talk( level => 'trace', message =>[ | ||||||||||||||||||||||||||||||||||||||||||
| 188 | ###LogSD "The current node is:", $current_node ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 189 | 26 | ▶ | if( (keys %$current_node)[0] eq 'styleSheet' ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 190 | ###LogSD $phone->talk( level => 'trace', message =>[ | ||||||||||||||||||||||||||||||||||||||||||
| 191 | ###LogSD "Found the core properties node" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 192 | 26 | $result = 2; | |||||||||||||||||||||||||||||||||||||||||
| 193 | 26 | $node_name = 'styleSheet'; | |||||||||||||||||||||||||||||||||||||||||
| 194 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | ( $result, $node_name, $node_level, $result_ref ) = | |||||||||||||||||||||||||||||||||||||||||
| 196 | $self->advance_element_position( 'styleSheet' ); | ||||||||||||||||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||||
| 199 | # Record file state | ||||||||||||||||||||||||||||||||||||||||||
| 200 | 26 | ▶ | if( $result ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 201 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 202 | ###LogSD "The styleSheet node has value" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 203 | 26 | $self->good_load( 1 );# Is there a need to check for an empty node here??? | |||||||||||||||||||||||||||||||||||||||||
| 204 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 205 | 0 | $self->set_error( "No 'styleSheet' elements with content found - can't parse this as a styles file" ); | |||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||
| 207 | } | ||||||||||||||||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||||||||||||||||
| 209 | # Initial pull from the xml | ||||||||||||||||||||||||||||||||||||||||||
| 210 | 26 | my ( $success, $custom_format_ref, $top_level_ref ); | |||||||||||||||||||||||||||||||||||||||||
| 211 | 26 | ▶ | if( $self->should_cache_positions ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 212 | 23 | $top_level_ref = $self->parse_element; | |||||||||||||||||||||||||||||||||||||||||
| 213 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 214 | ###LogSD "Parsing the whole thing for caching" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 215 | 23 | $self->close_the_file;# Don't need the file open any more! | |||||||||||||||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||||||||||||||||
| 217 | 23 | $top_level_ref = $self->squash_node( $top_level_ref );#, 'numFmts' | |||||||||||||||||||||||||||||||||||||||||
| 218 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 219 | ###LogSD "Squashed ref:", $top_level_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 220 | $custom_format_ref = | ||||||||||||||||||||||||||||||||||||||||||
| 221 | !exists $top_level_ref->{numFmts} ? undef : | ||||||||||||||||||||||||||||||||||||||||||
| 222 | exists $top_level_ref->{numFmts}->{list} ? | ||||||||||||||||||||||||||||||||||||||||||
| 223 | $top_level_ref->{numFmts}->{list} : | ||||||||||||||||||||||||||||||||||||||||||
| 224 | 23 | ▶ | [ $top_level_ref->{numFmts}->{numFmt} ] ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 225 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 226 | ###LogSD "Initial extraction of numFmts:", $custom_format_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 227 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 228 | 3 | ( $result, $node_name, $node_level, $result_ref ) = | |||||||||||||||||||||||||||||||||||||||||
| 229 | $self->advance_element_position( 'numFmts' ); | ||||||||||||||||||||||||||||||||||||||||||
| 230 | 3 | ▶ | if( $result ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 231 | 3 | $top_level_ref = $self->parse_element; | |||||||||||||||||||||||||||||||||||||||||
| 232 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 233 | ###LogSD "Pulling the custom number formats only:", $custom_format_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 234 | 3 | $top_level_ref = $self->squash_node( $top_level_ref );#, 'numFmts' | |||||||||||||||||||||||||||||||||||||||||
| 235 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 236 | ###LogSD "Squashed ref:", $top_level_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 237 | $custom_format_ref = exists $top_level_ref->{list} ? | ||||||||||||||||||||||||||||||||||||||||||
| 238 | 3 | ▶ | $top_level_ref->{list} : [ $top_level_ref->{numFmt} ] ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 239 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 240 | ###LogSD "Initial extraction of numFmts:", $custom_format_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 241 | } | ||||||||||||||||||||||||||||||||||||||||||
| 242 | 3 | $self->start_the_file_over; | |||||||||||||||||||||||||||||||||||||||||
| 243 | } | ||||||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||||||
| 245 | # Load the custom formats | ||||||||||||||||||||||||||||||||||||||||||
| 246 | 26 | ▶ | if( $custom_format_ref ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 247 | 17 | my $translations; | |||||||||||||||||||||||||||||||||||||||||
| 248 | 17 | for my $format ( @$custom_format_ref ){ | |||||||||||||||||||||||||||||||||||||||||
| 249 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 250 | ###LogSD "Adding sheet defined translations:", $format ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 251 | 21 | my $format_code = $format->{formatCode}; | |||||||||||||||||||||||||||||||||||||||||
| 252 | 21 | $format_code =~ s/\\//g; | |||||||||||||||||||||||||||||||||||||||||
| 253 | 21 | $translations->[$format->{numFmtId}] = $format_code; | |||||||||||||||||||||||||||||||||||||||||
| 254 | } | ||||||||||||||||||||||||||||||||||||||||||
| 255 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 256 | ###LogSD 'loading format positions:', $translations ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 257 | 17 | $self->set_defined_excel_formats( $translations ); | |||||||||||||||||||||||||||||||||||||||||
| 258 | } | ||||||||||||||||||||||||||||||||||||||||||
| 259 | |||||||||||||||||||||||||||||||||||||||||||
| 260 | # Cache remaining as needed | ||||||||||||||||||||||||||||||||||||||||||
| 261 | 26 | my( $list_to_cache, $count ); | |||||||||||||||||||||||||||||||||||||||||
| 262 | 26 | ▶ | if( $self->should_cache_positions ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 263 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 264 | ###LogSD "Build and load the rest of the cache", $top_level_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 265 | |||||||||||||||||||||||||||||||||||||||||||
| 266 | # Build specfic formats | ||||||||||||||||||||||||||||||||||||||||||
| 267 | 23 | ▶ | if( !exists $top_level_ref->{cellXfs} or | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
exists $top_level_ref->{'cellXfs'} && (exists $top_level_ref->{'cellXfs'}{'list'} || exists $top_level_ref->{'cellXfs'}{'xf'})
exists $top_level_ref->{"cellXfs"}{"list"} or exists $top_level_ref->{"cellXfs"}{"xf"}
MC/DC0%0/3
exists $top_level_ref->{'cellXfs'} && (exists $top_level_ref->{'cellXfs'}{'list'} || exists $top_level_ref->{'cellXfs'}{'xf'})
exists $top_level_ref->{'cellXfs'}
exists $top_level_ref->{"cellXfs"}{"list"}
exists $top_level_ref->{"cellXfs"}{"xf"}
Truth table50%2/4
A && B or C
A= exists $top_level_ref->{'cellXfs'}B= exists $top_level_ref->{"cellXfs"}{"list"}C= exists $top_level_ref->{"cellXfs"}{"xf"}
| |||||||||||||||||||||||||||||||||||||||||||
| 268 | (!exists $top_level_ref->{cellXfs}->{list} and !exists $top_level_ref->{cellXfs}->{xf}) ){ | ||||||||||||||||||||||||||||||||||||||||||
| 269 | 0 | $self->set_error( "No base level formats (cellXfs) stored" ); | |||||||||||||||||||||||||||||||||||||||||
| 270 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 271 | my $cell_xfs = exists $top_level_ref->{cellXfs}->{list} ? | ||||||||||||||||||||||||||||||||||||||||||
| 272 | 23 | ▶ | $top_level_ref->{cellXfs}->{list} : [ $top_level_ref->{cellXfs}->{xf} ]; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 273 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 274 | ###LogSD "Loading specific cell formats:", $cell_xfs ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 275 | 23 | $self->_set_styles_count( scalar( @$cell_xfs ) ); | |||||||||||||||||||||||||||||||||||||||||
| 276 | 23 | for my $position ( @$cell_xfs ){ | |||||||||||||||||||||||||||||||||||||||||
| 277 | 331 | my $stacked_ref = $self->_stack_perl_ref( $top_level_ref, $position ); | |||||||||||||||||||||||||||||||||||||||||
| 278 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 279 | ###LogSD "Updated position:", $stacked_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 280 | 331 | $self->_add_s_position( $stacked_ref ); | |||||||||||||||||||||||||||||||||||||||||
| 281 | } | ||||||||||||||||||||||||||||||||||||||||||
| 282 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 283 | ###LogSD "Final specific caches:", $self->_get_all_cache ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 284 | } | ||||||||||||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||||||||||||
| 286 | # Build generic formats | ||||||||||||||||||||||||||||||||||||||||||
| 287 | 23 | ▶ | if( exists $top_level_ref->{cellStyleXfs} and | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
exists $top_level_ref->{"cellStyleXfs"} and exists $top_level_ref->{"cellStyleXfs"}{"list"} || exists $top_level_ref->{"cellStyleXfs"}{"xf"}
exists $top_level_ref->{"cellStyleXfs"}{"list"} or exists $top_level_ref->{"cellStyleXfs"}{"xf"}
MC/DC0%0/3
exists $top_level_ref->{"cellStyleXfs"} and exists $top_level_ref->{"cellStyleXfs"}{"list"} || exists $top_level_ref->{"cellStyleXfs"}{"xf"}
exists $top_level_ref->{"cellStyleXfs"}
exists $top_level_ref->{"cellStyleXfs"}{"list"}
exists $top_level_ref->{"cellStyleXfs"}{"xf"}
Truth table50%2/4
A and B or C
A= exists $top_level_ref->{"cellStyleXfs"}B= exists $top_level_ref->{"cellStyleXfs"}{"list"}C= exists $top_level_ref->{"cellStyleXfs"}{"xf"}
| |||||||||||||||||||||||||||||||||||||||||||
| 288 | (exists $top_level_ref->{cellStyleXfs}->{list} or exists $top_level_ref->{cellStyleXfs}->{xf}) ){ | ||||||||||||||||||||||||||||||||||||||||||
| 289 | my $cell_style_xfs = exists $top_level_ref->{cellStyleXfs}->{list} ? | ||||||||||||||||||||||||||||||||||||||||||
| 290 | 23 | ▶ | $top_level_ref->{cellStyleXfs}->{list} : [ $top_level_ref->{cellStyleXfs}->{xf} ]; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 291 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 292 | ###LogSD "Loading generic cell formats" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 293 | 23 | $self->_set_generic_styles_count( scalar( @$cell_style_xfs ) ); | |||||||||||||||||||||||||||||||||||||||||
| 294 | 23 | for my $position ( @$cell_style_xfs ){ | |||||||||||||||||||||||||||||||||||||||||
| 295 | 24 | my $stacked_ref = $self->_stack_perl_ref( $top_level_ref, $position ); | |||||||||||||||||||||||||||||||||||||||||
| 296 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 297 | ###LogSD "Updated position:", $stacked_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 298 | 24 | $self->_add_gs_position( $stacked_ref ); | |||||||||||||||||||||||||||||||||||||||||
| 299 | } | ||||||||||||||||||||||||||||||||||||||||||
| 300 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 301 | ###LogSD "Final generic caches:", $self->_get_all_generic_cache ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 302 | } | ||||||||||||||||||||||||||||||||||||||||||
| 303 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 304 | ###LogSD "Completed caching" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 305 | } | ||||||||||||||||||||||||||||||||||||||||||
| 306 | 26 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 307 | } | ||||||||||||||||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||||||||||||||||
| 309 | #########1 Private Attributes 3#########4#########5#########6#########7#########8#########9 | ||||||||||||||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||||||||||||
| 311 | 20 | has _styles_positions =>( | |||||||||||||||||||||||||||||||||||||||||
| 312 | isa => ArrayRef, | ||||||||||||||||||||||||||||||||||||||||||
| 313 | traits => ['Array'], | ||||||||||||||||||||||||||||||||||||||||||
| 314 | handles =>{ | ||||||||||||||||||||||||||||||||||||||||||
| 315 | _get_s_position => 'get', | ||||||||||||||||||||||||||||||||||||||||||
| 316 | _set_s_position => 'set', | ||||||||||||||||||||||||||||||||||||||||||
| 317 | _add_s_position => 'push', | ||||||||||||||||||||||||||||||||||||||||||
| 318 | }, | ||||||||||||||||||||||||||||||||||||||||||
| 319 | reader => '_get_all_cache', | ||||||||||||||||||||||||||||||||||||||||||
| 320 | predicate => '_has_styles_positions' | ||||||||||||||||||||||||||||||||||||||||||
| 321 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||||||||||||||||
| 323 | 20 | has _styles_count =>( | |||||||||||||||||||||||||||||||||||||||||
| 324 | isa => Int, | ||||||||||||||||||||||||||||||||||||||||||
| 325 | default => 0, | ||||||||||||||||||||||||||||||||||||||||||
| 326 | reader => '_get_styles_count', | ||||||||||||||||||||||||||||||||||||||||||
| 327 | writer => '_set_styles_count', | ||||||||||||||||||||||||||||||||||||||||||
| 328 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 329 | |||||||||||||||||||||||||||||||||||||||||||
| 330 | 20 | has _generic_styles_positions =>( | |||||||||||||||||||||||||||||||||||||||||
| 331 | isa => ArrayRef, | ||||||||||||||||||||||||||||||||||||||||||
| 332 | traits => ['Array'], | ||||||||||||||||||||||||||||||||||||||||||
| 333 | handles =>{ | ||||||||||||||||||||||||||||||||||||||||||
| 334 | _get_gs_position => 'get', | ||||||||||||||||||||||||||||||||||||||||||
| 335 | _set_gs_position => 'set', | ||||||||||||||||||||||||||||||||||||||||||
| 336 | _add_gs_position => 'push', | ||||||||||||||||||||||||||||||||||||||||||
| 337 | }, | ||||||||||||||||||||||||||||||||||||||||||
| 338 | reader => '_get_all_generic_cache', | ||||||||||||||||||||||||||||||||||||||||||
| 339 | predicate => '_has_generic_styles_positions' | ||||||||||||||||||||||||||||||||||||||||||
| 340 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||||||||||||||||||
| 342 | 20 | has _generic_styles_count =>( | |||||||||||||||||||||||||||||||||||||||||
| 343 | isa => Int, | ||||||||||||||||||||||||||||||||||||||||||
| 344 | default => 0, | ||||||||||||||||||||||||||||||||||||||||||
| 345 | reader => '_get_generic_styles_count', | ||||||||||||||||||||||||||||||||||||||||||
| 346 | writer => '_set_generic_styles_count', | ||||||||||||||||||||||||||||||||||||||||||
| 347 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 348 | |||||||||||||||||||||||||||||||||||||||||||
| 349 | #########1 Private Methods 3#########4#########5#########6#########7#########8#########9 | ||||||||||||||||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||||||||||||||||
| 351 | 12 | ▶ | sub _build_cell_style_formats{ | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_build_cell_style_formats: called CC=11 SCAR=34.9
| |||||||||||||||||||||||||||||||||||||||||||
| 352 | 12 | my( $self, $base_ref, $target_header, $exclude_header ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 353 | ###LogSD my $phone = Log::Shiras::Telephone->new( name_space => | ||||||||||||||||||||||||||||||||||||||||||
| 354 | ###LogSD $self->get_all_space . '::_build_cell_style_formats', ); | ||||||||||||||||||||||||||||||||||||||||||
| 355 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 356 | ###LogSD "Building a perl style (cell ready) ref from the base xml ref", $base_ref, | ||||||||||||||||||||||||||||||||||||||||||
| 357 | ###LogSD ( $target_header ? "..returning only header: $target_header" : undef ), | ||||||||||||||||||||||||||||||||||||||||||
| 358 | ###LogSD ( $exclude_header ? "..excluding header: $exclude_header" : undef ), ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 359 | 12 | my $return_ref; | |||||||||||||||||||||||||||||||||||||||||
| 360 | |||||||||||||||||||||||||||||||||||||||||||
| 361 | # Handle target header | ||||||||||||||||||||||||||||||||||||||||||
| 362 | 12 | ▶ | if( $target_header ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 363 | 9 | ▶ | if( exists $xml_from_cell->{$target_header} and exists $base_ref->{$xml_from_cell->{$target_header}} ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition33%1/3
exists $xml_from_cell->{$target_header} and exists $$base_ref{$xml_from_cell->{$target_header}}
MC/DC0%0/2
exists $xml_from_cell->{$target_header} and exists $$base_ref{$xml_from_cell->{$target_header}}
exists $xml_from_cell->{$target_header}
exists $$base_ref{$xml_from_cell->{$target_header}}
Truth table33%1/3
A and B
A= exists $xml_from_cell->{$target_header}B= exists $$base_ref{$xml_from_cell->{$target_header}}
| |||||||||||||||||||||||||||||||||||||||||||
| 364 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 365 | ###LogSD "Possible conversion of header -$target_header- to: $xml_from_cell->{$target_header}", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 366 | 9 | $return_ref->{$xml_from_cell->{$target_header}} = $base_ref->{$xml_from_cell->{$target_header}}; | |||||||||||||||||||||||||||||||||||||||||
| 367 | }elsif( exists $base_ref->{$target_header} ){ | ||||||||||||||||||||||||||||||||||||||||||
| 368 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 369 | ###LogSD "Using header -$target_header- as is", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 370 | 0 | $return_ref->{$target_header} = $base_ref->{$target_header}; | |||||||||||||||||||||||||||||||||||||||||
| 371 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 372 | 0 | ▶ | my $alt_header = exists $cell_attributes->{$target_header} ? $cell_attributes->{$target_header} : $target_header; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 373 | 0 | $self->set_error( "Failed to isolate -$target_header- in the passed ref" ); | |||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | return { $alt_header => undef }; | |||||||||||||||||||||||||||||||||||||||||
| 375 | } | ||||||||||||||||||||||||||||||||||||||||||
| 376 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 377 | ###LogSD "Updated return ref:", $return_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 378 | } | ||||||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||||||
| 380 | # Handle exclude header | ||||||||||||||||||||||||||||||||||||||||||
| 381 | 12 | ▶ | if( !$return_ref ){# Handle no target or exclude calls | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 382 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 383 | ###LogSD "Adding all elements to be filled", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 384 | 3 | $return_ref = clone( $base_ref ); | |||||||||||||||||||||||||||||||||||||||||
| 385 | } | ||||||||||||||||||||||||||||||||||||||||||
| 386 | 12 | ▶ | if( $exclude_header ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 387 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 388 | ###LogSD "Excluding: $exclude_header", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 389 | 0 | ▶ | if( exists $xml_from_cell->{$exclude_header} and exists $return_ref->{$xml_from_cell->{$exclude_header}} ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/3
exists $xml_from_cell->{$exclude_header} and exists $$return_ref{$xml_from_cell->{$exclude_header}}
MC/DC0%0/2
exists $xml_from_cell->{$exclude_header} and exists $$return_ref{$xml_from_cell->{$exclude_header}}
exists $xml_from_cell->{$exclude_header}
exists $$return_ref{$xml_from_cell->{$exclude_header}}
Truth table0%0/3
A and B
A= exists $xml_from_cell->{$exclude_header}B= exists $$return_ref{$xml_from_cell->{$exclude_header}}
| |||||||||||||||||||||||||||||||||||||||||||
| 390 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 391 | ###LogSD "Possible conversion of header -$exclude_header- to: $xml_from_cell->{$exclude_header}", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 392 | 0 | delete $return_ref->{$xml_from_cell->{$exclude_header}}; | |||||||||||||||||||||||||||||||||||||||||
| 393 | }elsif( exists $base_ref->{$target_header} ){ | ||||||||||||||||||||||||||||||||||||||||||
| 394 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 395 | ###LogSD "Using header -$exclude_header- as is", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 396 | 0 | delete $return_ref->{$target_header}; | |||||||||||||||||||||||||||||||||||||||||
| 397 | } | ||||||||||||||||||||||||||||||||||||||||||
| 398 | } | ||||||||||||||||||||||||||||||||||||||||||
| 399 | |||||||||||||||||||||||||||||||||||||||||||
| 400 | # Load the sub values | ||||||||||||||||||||||||||||||||||||||||||
| 401 | 12 | $return_ref = $self->_stack_perl_ref( 'dummy', $return_ref ); | |||||||||||||||||||||||||||||||||||||||||
| 402 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 403 | ###LogSD "Returning ref:", $return_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 404 | 12 | return $return_ref; | |||||||||||||||||||||||||||||||||||||||||
| 405 | } | ||||||||||||||||||||||||||||||||||||||||||
| 406 | |||||||||||||||||||||||||||||||||||||||||||
| 407 | 27 | ▶ | sub _get_header_and_value{ | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_get_header_and_value: called CC=11 SCAR=28.5
| |||||||||||||||||||||||||||||||||||||||||||
| 408 | 27 | my( $self, $target_header, $target_position ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 409 | 27 | ▶ | $target_header = exists $key_translations->{$target_header} ? $key_translations->{$target_header} : $target_header; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 410 | 27 | ▶ | my $sub_header = exists $element_lookup->{$target_header} ? $element_lookup->{$target_header} : 'dealers_choice'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 411 | ###LogSD my $phone = Log::Shiras::Telephone->new( name_space => | ||||||||||||||||||||||||||||||||||||||||||
| 412 | ###LogSD $self->get_all_space . '::_get_header_and_value', ); | ||||||||||||||||||||||||||||||||||||||||||
| 413 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 414 | ###LogSD "getting the ref for target header: $target_header", | ||||||||||||||||||||||||||||||||||||||||||
| 415 | ###LogSD "..with sub header: $sub_header", | ||||||||||||||||||||||||||||||||||||||||||
| 416 | ###LogSD "..and position: $target_position", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 417 | |||||||||||||||||||||||||||||||||||||||||||
| 418 | |||||||||||||||||||||||||||||||||||||||||||
| 419 | 27 | my( $key, $value ); | |||||||||||||||||||||||||||||||||||||||||
| 420 | 27 | ▶ | if( $target_header =~ /^apply/ ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 421 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 422 | ###LogSD "Found an 'apply flag'", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 423 | 0 | ( $key, $value ) = ( $target_header, $target_position ); | |||||||||||||||||||||||||||||||||||||||||
| 424 | }elsif( $target_header eq 'numFmtId' ){ | ||||||||||||||||||||||||||||||||||||||||||
| 425 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 426 | ###LogSD "Pulling the number conversion for position: $target_position", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 427 | 0 | ( $key, $value ) = ( $cell_attributes->{$target_header}, $self->get_defined_conversion( $target_position ) ); | |||||||||||||||||||||||||||||||||||||||||
| 428 | }elsif( !exists $cell_attributes->{$target_header} ){ | ||||||||||||||||||||||||||||||||||||||||||
| 429 | 0 | $self->set_error( "Format key -$target_header- not yet supported by this package" ); | |||||||||||||||||||||||||||||||||||||||||
| 430 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 431 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 432 | ###LogSD "Reaching into the xml for header -$target_header- position: $target_position", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 433 | 27 | ▶ | if( is_Int( $target_position ) ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 434 | 27 | my $current_node = $self->current_named_node; | |||||||||||||||||||||||||||||||||||||||||
| 435 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 436 | ###LogSD "Starting at node:", $current_node, "..and position: " . ($self->where_am_i//'undef') ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 437 | 27 | my $sub_header = $element_lookup->{$target_header}; | |||||||||||||||||||||||||||||||||||||||||
| 438 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 439 | ###LogSD "For the super header: $target_header", | ||||||||||||||||||||||||||||||||||||||||||
| 440 | ###LogSD "Accessing the Styles file for position -$target_position- of the header: $sub_header", | ||||||||||||||||||||||||||||||||||||||||||
| 441 | ###LogSD "..currently at the node:", $current_node,] ); | ||||||||||||||||||||||||||||||||||||||||||
| 442 | |||||||||||||||||||||||||||||||||||||||||||
| 443 | # Begin at the beginning | ||||||||||||||||||||||||||||||||||||||||||
| 444 | 27 | my( $result, $node_name, $node_level, $result_ref ); | |||||||||||||||||||||||||||||||||||||||||
| 445 | 27 | ▶ | if( $current_node->{name} eq $target_header ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 446 | ###LogSD $phone->talk( level => 'trace', message =>[ | ||||||||||||||||||||||||||||||||||||||||||
| 447 | ###LogSD "Found the core properties node" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 448 | 0 | $result = 2; | |||||||||||||||||||||||||||||||||||||||||
| 449 | 0 | $node_name = $target_header; | |||||||||||||||||||||||||||||||||||||||||
| 450 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 451 | 27 | ( $result, $node_name, $node_level, $result_ref ) = | |||||||||||||||||||||||||||||||||||||||||
| 452 | $self->advance_element_position( $target_header );# Can't tell which sub position you are at :( | ||||||||||||||||||||||||||||||||||||||||||
| 453 | ###LogSD $phone->talk( level => 'trace', message =>[ | ||||||||||||||||||||||||||||||||||||||||||
| 454 | ###LogSD "After search arrived at node -$node_name- with result: $result" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 455 | 27 | ▶ | if( !$result ){# One more attempt | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 456 | ###LogSD $phone->talk( level => 'trace', message =>[ | ||||||||||||||||||||||||||||||||||||||||||
| 457 | ###LogSD "Starting the file over just in case the value is back" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 458 | 15 | $self->start_the_file_over; | |||||||||||||||||||||||||||||||||||||||||
| 459 | 15 | ( $result, $node_name, $node_level, $result_ref ) = | |||||||||||||||||||||||||||||||||||||||||
| 460 | $self->advance_element_position( $target_header ); | ||||||||||||||||||||||||||||||||||||||||||
| 461 | ###LogSD $phone->talk( level => 'trace', message =>[ | ||||||||||||||||||||||||||||||||||||||||||
| 462 | ###LogSD "After search arrived at node -$node_name- with result: $result" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 463 | } | ||||||||||||||||||||||||||||||||||||||||||
| 464 | 27 | ▶ | if( !$result ){# Just not here! | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 465 | ###LogSD $phone->talk( level => 'trace', message =>[ "Fail!!!!!!!!!!" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 466 | 0 | $self->set_error( "Requested styles header -$target_header- is not found in this workbook" ); | |||||||||||||||||||||||||||||||||||||||||
| 467 | 0 | return( undef, undef ); | |||||||||||||||||||||||||||||||||||||||||
| 468 | } | ||||||||||||||||||||||||||||||||||||||||||
| 469 | } | ||||||||||||||||||||||||||||||||||||||||||
| 470 | |||||||||||||||||||||||||||||||||||||||||||
| 471 | # Index to the indicated sub position | ||||||||||||||||||||||||||||||||||||||||||
| 472 | 27 | ( $result, $node_name, $node_level, $result_ref ) = | |||||||||||||||||||||||||||||||||||||||||
| 473 | $self->advance_element_position( $sub_header, $target_position + 1 ); | ||||||||||||||||||||||||||||||||||||||||||
| 474 | ###LogSD $phone->talk( level => 'trace', message =>[ | ||||||||||||||||||||||||||||||||||||||||||
| 475 | ###LogSD "After search for header -$sub_header- and position -" . | ||||||||||||||||||||||||||||||||||||||||||
| 476 | ###LogSD ($target_position + 1) . "- arrived at node -$node_name- with result: $result" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 477 | 27 | ▶ | if( !$result ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 478 | 0 | $self->set_error( "Requested styles sub position for -$target_header- is not found in this workbook" ); | |||||||||||||||||||||||||||||||||||||||||
| 479 | 0 | return( undef, undef ); | |||||||||||||||||||||||||||||||||||||||||
| 480 | } | ||||||||||||||||||||||||||||||||||||||||||
| 481 | |||||||||||||||||||||||||||||||||||||||||||
| 482 | # Pull the data | ||||||||||||||||||||||||||||||||||||||||||
| 483 | 27 | my $base_ref = $self->parse_element; | |||||||||||||||||||||||||||||||||||||||||
| 484 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 485 | ###LogSD "Pulling data from target header -$target_header- for position -$target_position- gives ref:", $base_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 486 | |||||||||||||||||||||||||||||||||||||||||||
| 487 | 27 | ( $key, $value ) = ( $cell_attributes->{$target_header}, $base_ref ); | |||||||||||||||||||||||||||||||||||||||||
| 488 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 489 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 490 | ###LogSD "just translating the key for the sub-ref:", $target_position ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 491 | 0 | ( $key, $value ) = ( $cell_attributes->{$key}, $target_position ); | |||||||||||||||||||||||||||||||||||||||||
| 492 | } | ||||||||||||||||||||||||||||||||||||||||||
| 493 | } | ||||||||||||||||||||||||||||||||||||||||||
| 494 | 27 | $value = $self->squash_node( $value ); | |||||||||||||||||||||||||||||||||||||||||
| 495 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 496 | ###LogSD "Returning key: $key", "..and value:", $value ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 497 | 27 | return( $key, $value ); | |||||||||||||||||||||||||||||||||||||||||
| 498 | } | ||||||||||||||||||||||||||||||||||||||||||
| 499 | |||||||||||||||||||||||||||||||||||||||||||
| 500 | 367 | ▶ | sub _stack_perl_ref{ | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_stack_perl_ref: called CC=12 SCAR=25.1
| |||||||||||||||||||||||||||||||||||||||||||
| 501 | 367 | my( $self, $top_ref, $current_ref, ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 502 | ###LogSD my $phone = Log::Shiras::Telephone->new( name_space => | ||||||||||||||||||||||||||||||||||||||||||
| 503 | ###LogSD $self->get_all_space . '::_stack_perl_ref', ); | ||||||||||||||||||||||||||||||||||||||||||
| 504 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 505 | ###LogSD "..with high level ref:", $top_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 506 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 507 | ###LogSD "building out the ref:", $current_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 508 | 367 | my $new_ref; | |||||||||||||||||||||||||||||||||||||||||
| 509 | |||||||||||||||||||||||||||||||||||||||||||
| 510 | # Handle attributes | ||||||||||||||||||||||||||||||||||||||||||
| 511 | 367 | ▶ | if( is_HashRef( $current_ref ) ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 512 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 513 | ###LogSD "processing the attributes of a hashref" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 514 | 367 | for my $attribute ( keys %$current_ref ){ | |||||||||||||||||||||||||||||||||||||||||
| 515 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 516 | ###LogSD "Processing the attribute $attribute => $current_ref->{$attribute}", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 517 | 2230 | ▶ | if( $attribute eq 'xfId' or $attribute eq 'builtinId' ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
Condition66%2/3
$attribute eq "xfId" or $attribute eq "builtinId"
MC/DC50%1/2
$attribute eq "xfId" or $attribute eq "builtinId"
$attribute eq "xfId"
$attribute eq "builtinId"
Truth table66%2/3
A or B
A= $attribute eq "xfId"B= $attribute eq "builtinId"
| |||||||||||||||||||||||||||||||||||||||||||
| 518 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 519 | ###LogSD "Skipping the -$attribute- attribute", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 520 | }elsif( $attribute eq 'numFmtId' ){ | ||||||||||||||||||||||||||||||||||||||||||
| 521 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 522 | ###LogSD "Setting -$cell_attributes->{$attribute}- with number conversion for position: $current_ref->{$attribute}", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 523 | 361 | $new_ref->{$cell_attributes->{$attribute}} = $self->get_defined_conversion( $current_ref->{$attribute} ); | |||||||||||||||||||||||||||||||||||||||||
| 524 | }elsif( $attribute =~ /Id$/i ){ | ||||||||||||||||||||||||||||||||||||||||||
| 525 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 526 | ###LogSD "pulling sub ref for attribute -$attribute- from: $key_translations->{$attribute}", substr($attribute, 0, -2) ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 527 | 1080 | my( $key, $return ); | |||||||||||||||||||||||||||||||||||||||||
| 528 | 1080 | ▶ | if( $self->should_cache_positions ){ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 529 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 530 | ###LogSD "Positions should be cached (built) already - using top ref:", $top_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 531 | 1065 | my $sub_node = $top_ref->{$key_translations->{$attribute}}; | |||||||||||||||||||||||||||||||||||||||||
| 532 | 1065 | ▶ | my $count = exists $sub_node->{count} ? $sub_node->{count} : undef ;# to be used for double checking as needed | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 533 | 1065 | ▶ | my $list_ref = exists $sub_node->{list} ? $sub_node->{list} : [$sub_node->{substr($attribute, 0, -2)}] ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 534 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 535 | ###LogSD "Pulling position -$current_ref->{$attribute}- from sub ref:", $sub_node, $list_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 536 | 1065 | $return = $list_ref->[$current_ref->{$attribute}]; | |||||||||||||||||||||||||||||||||||||||||
| 537 | 1065 | $key = $cell_attributes->{$attribute}; | |||||||||||||||||||||||||||||||||||||||||
| 538 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 539 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 540 | ###LogSD "Positions are not cached - pulling the data from subsection " . | ||||||||||||||||||||||||||||||||||||||||||
| 541 | ###LogSD "-$key_translations->{$attribute}- and position: $current_ref->{$attribute}", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 542 | 15 | ( $key, $return ) = $self->_get_header_and_value( $key_translations->{$attribute}, $current_ref->{$attribute} ); | |||||||||||||||||||||||||||||||||||||||||
| 543 | } | ||||||||||||||||||||||||||||||||||||||||||
| 544 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 545 | ###LogSD "Setting the new ref attribute -$key- based on the base attribute -$attribute- as the cell value:", $return ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 546 | 1080 | $new_ref->{$key} = $return; | |||||||||||||||||||||||||||||||||||||||||
| 547 | }elsif( exists $cell_attributes->{$attribute} ){ | ||||||||||||||||||||||||||||||||||||||||||
| 548 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 549 | ###LogSD "Setting new ref key -$cell_attributes->{$attribute}- to value: $current_ref->{$attribute}", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 550 | 77 | $new_ref->{$cell_attributes->{$attribute}} = $current_ref->{$attribute}; | |||||||||||||||||||||||||||||||||||||||||
| 551 | }else{ | ||||||||||||||||||||||||||||||||||||||||||
| 552 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 553 | ###LogSD "Setting new ref key -$attribute- to value: $current_ref->{$attribute}", ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 554 | 381 | $new_ref->{$attribute} = $current_ref->{$attribute}; | |||||||||||||||||||||||||||||||||||||||||
| 555 | } | ||||||||||||||||||||||||||||||||||||||||||
| 556 | } | ||||||||||||||||||||||||||||||||||||||||||
| 557 | }elsif( defined $current_ref ){ | ||||||||||||||||||||||||||||||||||||||||||
| 558 | ###LogSD $phone->talk( level => 'debug', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 559 | ###LogSD "The attribute only has a base value: $current_ref->{attributes}" ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 560 | 0 | $new_ref = $current_ref; | |||||||||||||||||||||||||||||||||||||||||
| 561 | } | ||||||||||||||||||||||||||||||||||||||||||
| 562 | |||||||||||||||||||||||||||||||||||||||||||
| 563 | ###LogSD $phone->talk( level => 'trace', message => [ | ||||||||||||||||||||||||||||||||||||||||||
| 564 | ###LogSD "Final new ref is:", $new_ref ] ); | ||||||||||||||||||||||||||||||||||||||||||
| 565 | 367 | return $new_ref; | |||||||||||||||||||||||||||||||||||||||||
| 566 | } | ||||||||||||||||||||||||||||||||||||||||||
| 567 | |||||||||||||||||||||||||||||||||||||||||||
| 568 | #########1 Phinish 3#########4#########5#########6#########7#########8#########9 | ||||||||||||||||||||||||||||||||||||||||||
| 569 | |||||||||||||||||||||||||||||||||||||||||||
| 570 | 20 | ▶ | no Moose::Role; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 571 | |||||||||||||||||||||||||||||||||||||||||||
| 572 | 20 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 573 | |||||||||||||||||||||||||||||||||||||||||||
| 574 | #########1 Documentation 3#########4#########5#########6#########7#########8#########9 | ||||||||||||||||||||||||||||||||||||||||||
| 575 | __END__ | ||||||||||||||||||||||||||||||||||||||||||