← Index
NYTProf Performance Profile   « line view »
For /usr/local/libexec/sympa/task_manager-debug.pl
  Run on Tue Jun 1 22:32:51 2021
Reported on Tue Jun 1 22:35:13 2021

Filename/usr/local/libexec/sympa/Sympa/HTML/FormatText.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sSympa::HTML::FormatText::::BEGIN@30Sympa::HTML::FormatText::BEGIN@30
0000s0sSympa::HTML::FormatText::::BEGIN@31Sympa::HTML::FormatText::BEGIN@31
0000s0sSympa::HTML::FormatText::::BEGIN@33Sympa::HTML::FormatText::BEGIN@33
0000s0sSympa::HTML::FormatText::::BEGIN@35Sympa::HTML::FormatText::BEGIN@35
0000s0sSympa::HTML::FormatText::::__ANON__Sympa::HTML::FormatText::__ANON__ (xsub)
0000s0sSympa::HTML::FormatText::::img_startSympa::HTML::FormatText::img_start
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# -*- indent-tabs-mode: nil; -*-
2# vim:ft=perl:et:sw=4
3# $Id$
4
5# Sympa - SYsteme de Multi-Postage Automatique
6#
7# Copyright (c) 1997, 1998, 1999 Institut Pasteur & Christophe Wolfhugel
8# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
9# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
10# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
11#
12# This program is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24
25package Sympa::HTML::FormatText;
26
27# This is a subclass of the HTML::FormatText object.
28# This subclassing is done to allow internationalisation of some strings
29
30use strict;
31use Encode qw();
32
33use Sympa::Language;
34
35use base qw(HTML::FormatText);
36
37my $language = Sympa::Language->instance;
38
39sub img_start {
40 my ($self, $node) = @_;
41
42 my $alt = $node->attr('alt');
43 $alt = Encode::encode_utf8($alt) if defined $alt;
44 $self->out(
45 Encode::decode_utf8(
46 (defined $alt and $alt =~ /\S/)
47 ? $language->gettext_sprintf("[Image:%s]", $alt)
48 : $language->gettext("[Image]")
49 )
50 );
51}
52
531;