← Index
NYTProf Performance Profile   « line view »
For svc/members/upsert
  Run on Tue Jan 13 11:50:22 2015
Reported on Tue Jan 13 12:09:48 2015

Filename/usr/share/perl5/MARC/File/Encode.pm
StatementsExecuted 10 statements in 139µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11111µs25µsMARC::File::Encode::::BEGIN@19MARC::File::Encode::BEGIN@19
1118µs54µsMARC::File::Encode::::BEGIN@22MARC::File::Encode::BEGIN@22
1117µs61µsMARC::File::Encode::::BEGIN@21MARC::File::Encode::BEGIN@21
1117µs11µsMARC::File::Encode::::BEGIN@20MARC::File::Encode::BEGIN@20
0000s0sMARC::File::Encode::::marc_to_utf8MARC::File::Encode::marc_to_utf8
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package MARC::File::Encode;
2
3=head1 NAME
4
5MARC::File::Encode - Encode wrapper for MARC::Record
6
7=head1 DESCRIPTION
8
9Encode.pm exports encode() by default, and MARC::File::USMARC
10already has a function encode() so we need this wrapper to
11keep things the way they are. I was half tempted to change
12MARC::File::USMARC::encode() to something else but there could
13very well be code in the wild that uses it directly and I don't
14want to break backwards compat. This probably comes with a performance
15hit of some kind.
16
17=cut
18
19224µs238µs
# spent 25µs (11+14) within MARC::File::Encode::BEGIN@19 which was called: # once (11µs+14µs) by MARC::File::USMARC::BEGIN@14 at line 19
use strict;
# spent 25µs making 1 call to MARC::File::Encode::BEGIN@19 # spent 14µs making 1 call to strict::import
20221µs215µs
# spent 11µs (7+4) within MARC::File::Encode::BEGIN@20 which was called: # once (7µs+4µs) by MARC::File::USMARC::BEGIN@14 at line 20
use warnings;
# spent 11µs making 1 call to MARC::File::Encode::BEGIN@20 # spent 4µs making 1 call to warnings::import
21227µs2115µs
# spent 61µs (7+54) within MARC::File::Encode::BEGIN@21 which was called: # once (7µs+54µs) by MARC::File::USMARC::BEGIN@14 at line 21
use base qw( Exporter );
# spent 61µs making 1 call to MARC::File::Encode::BEGIN@21 # spent 54µs making 1 call to base::import
22264µs299µs
# spent 54µs (8+45) within MARC::File::Encode::BEGIN@22 which was called: # once (8µs+45µs) by MARC::File::USMARC::BEGIN@14 at line 22
use Encode;
# spent 54µs making 1 call to MARC::File::Encode::BEGIN@22 # spent 45µs making 1 call to Exporter::import
23
241900nsour @EXPORT_OK = qw( marc_to_utf8 );
25
26=head2 marc_to_utf8()
27
28Simple wrapper around Encode::decode().
29
30=cut
31
32sub marc_to_utf8 {
33 # if there is invalid utf8 date then this will through an exception
34 # let's just hope it's valid :-)
35 return decode( 'UTF-8', $_[0], 1 );
36}
37
3812µs1;