← Index
Performance Profile   « block view • line view • sub view »
For t/test-parsing
  Run on Sun Nov 14 09:49:57 2010
Reported on Sun Nov 14 09:50:07 2010

File /usr/share/perl5/MARC/Charset/Constants.pm
Statements Executed 78
Total Time 0.0010589 seconds
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sMARC::Charset::Constants::::BEGINMARC::Charset::Constants::BEGIN
0000s0sMARC::Charset::Constants::::charset_nameMARC::Charset::Constants::charset_name
LineStmts.Exclusive
Time
Avg.Code
1package MARC::Charset::Constants;
2
3=head1 NAME
4
5MARC::Charset::Constants - constants for MARC::Charset
6
7=head1 SYNOPSIS
8
9 use MARC::Charset::Constants qw(:all);
10
11=head1 DESCRIPTION
12
13MARC::Charset needs to recognize various codes which are given
14descriptive names and assigned to constants in this package.
15
16=cut
17
18326µs9µsuse strict;
# spent 10µs making 1 call to strict::import
19329µs10µsuse warnings;
# spent 23µs making 1 call to warnings::import
20339µs13µsuse base qw( Exporter );
# spent 70µs making 1 call to base::import
21
22350µs17µsuse constant ESCAPE => chr(0x1B);
# spent 59µs making 1 call to constant::import
23
24337µs12µsuse constant SINGLE_G0_A => chr(0x28);
# spent 50µs making 1 call to constant::import
25332µs11µsuse constant SINGLE_G0_B => chr(0x2C);
# spent 40µs making 1 call to constant::import
26335µs12µsuse constant MULTI_G0_A => chr(0x24);
# spent 48µs making 1 call to constant::import
27332µs11µsuse constant MULTI_G0_B => chr(0x24) . chr(0x2C);
# spent 39µs making 1 call to constant::import
28
29331µs10µsuse constant SINGLE_G1_A => chr(0x29);
# spent 37µs making 1 call to constant::import
30334µs11µsuse constant SINGLE_G1_B => chr(0x2D);
# spent 43µs making 1 call to constant::import
31334µs11µsuse constant MULTI_G1_A => chr(0x24) . chr(0x29);
# spent 40µs making 1 call to constant::import
32332µs11µsuse constant MULTI_G1_B => chr(0x24) . chr(0x2D);
# spent 39µs making 1 call to constant::import
33
34331µs10µsuse constant GREEK_SYMBOLS => chr(0x67);
# spent 42µs making 1 call to constant::import
35335µs12µsuse constant SUBSCRIPTS => chr(0x62);
# spent 38µs making 1 call to constant::import
36335µs12µsuse constant SUPERSCRIPTS => chr(0x70);
# spent 41µs making 1 call to constant::import
37331µs10µsuse constant ASCII_DEFAULT => chr(0x73);
# spent 42µs making 1 call to constant::import
38
39330µs10µsuse constant BASIC_ARABIC => chr(0x33);
# spent 39µs making 1 call to constant::import
40330µs10µsuse constant EXTENDED_ARABIC => chr(0x34);
# spent 42µs making 1 call to constant::import
41325µs8µsuse constant BASIC_LATIN => chr(0x42);
# spent 28µs making 1 call to constant::import
42328µs10µsuse constant EXTENDED_LATIN => chr(0x45);
# spent 41µs making 1 call to constant::import
43325µs8µsuse constant CJK => chr(0x31);
# spent 32µs making 1 call to constant::import
44335µs12µsuse constant BASIC_CYRILLIC => chr(0x4E);
# spent 43µs making 1 call to constant::import
45330µs10µsuse constant EXTENDED_CYRILLIC => chr(0x51);
# spent 42µs making 1 call to constant::import
46337µs12µsuse constant BASIC_GREEK => chr(0x53);
# spent 50µs making 1 call to constant::import
473247µs82µsuse constant BASIC_HEBREW => chr(0x32);
# spent 38µs making 1 call to constant::import
48
4919µs9µsour %EXPORT_TAGS = ( all => [ qw(
50 ESCAPE GREEK_SYMBOLS SUBSCRIPTS SUPERSCRIPTS ASCII_DEFAULT
51 SINGLE_G0_A SINGLE_G0_B MULTI_G0_A MULTI_G0_B SINGLE_G1_A
52 SINGLE_G1_B MULTI_G1_A MULTI_G1_B BASIC_ARABIC
53 EXTENDED_ARABIC BASIC_LATIN EXTENDED_LATIN CJK BASIC_CYRILLIC
54 EXTENDED_CYRILLIC BASIC_GREEK BASIC_HEBREW) ]);
55
5615µs5µsour @EXPORT_OK = qw(
57 ESCAPE GREEK_SYMBOLS SUBSCRIPTS SUPERSCRIPTS ASCII_DEFAULT
58 SINGLE_G0_A SINGLE_G0_B MULTI_G0_A MULTI_G0_B SINGLE_G1_A
59 SINGLE_G1_B MULTI_G1_A MULTI_G1_B BASIC_ARABIC
60 EXTENDED_ARABIC BASIC_LATIN EXTENDED_LATIN CJK BASIC_CYRILLIC
61 EXTENDED_CYRILLIC BASIC_GREEK BASIC_HEBREW);
62
63sub charset_name
64{
65 my $charset = shift;
66 return 'GREEK_SYMBOLS' if $charset eq GREEK_SYMBOLS;
67 return 'SUBSCRIPTS' if $charset eq SUBSCRIPTS;
68 return 'SUPERSCRIPTS' if $charset eq SUPERSCRIPTS;
69 return 'ASCII_DEFAULT' if $charset eq ASCII_DEFAULT;
70 return 'BASIC_ARABIC' if $charset eq BASIC_ARABIC;
71 return 'EXTENDED_ARABIC' if $charset eq EXTENDED_ARABIC;
72 return 'BASIC_LATIN' if $charset eq BASIC_LATIN;
73 return 'EXTENDED_LATIN' if $charset eq EXTENDED_LATIN;
74 return 'CJK' if $charset eq CJK;
75 return 'BASIC_CYRILLIC' if $charset eq BASIC_CYRILLIC;
76 return 'EXTENDED_CYRILLIC' if $charset eq EXTENDED_CYRILLIC;
77 return 'BASIC_GREEK' if $charset eq BASIC_GREEK;
78 return 'BASIC_HEBREW' if $charset eq BASIC_HEBREW;
79}
80
81
82114µs14µs1;