--- trunk/lib/WebPAC/Common.pm 2005/07/16 20:35:30 10 +++ trunk/lib/WebPAC/Common.pm 2005/07/16 23:56:14 13 @@ -269,45 +269,6 @@ return $ret || undef; } -=head2 _sort_by_order - -Sort xml tags data structure accoding to C attribute. - -=cut - -sub _sort_by_order { - my $self = shift; - - my $va = $self->{'import_xml'}->{'indexer'}->{$a}->{'order'} || - $self->{'import_xml'}->{'indexer'}->{$a}; - my $vb = $self->{'import_xml'}->{'indexer'}->{$b}->{'order'} || - $self->{'import_xml'}->{'indexer'}->{$b}; - - return $va <=> $vb; -} - -=head2 _x - -Convert string from UTF-8 to code page defined in C. - - my $text = $webpac->_x('utf8 text'); - -Default application code page is C. You will probably want to -change that when creating new instance of object based on this one. - -=cut - -sub _x { - my $self = shift; - my $utf8 = shift || return; - - # create UTF-8 convertor for import_xml files - $self->{'utf2cp'} ||= Text::Iconv->new('UTF-8' ,$self->{'code_page'} || 'ISO-8859-2'); - - return $self->{'utf2cp'}->convert($utf8) || - $self->_get_logger()->logwarn("can't convert '$utf8'"); -} - =head2 _init_logger This function will init C using provided configuration file.