Profile of DateTime/Format/Alami/EN.pm

← Index
NYTProf Performance Profile «line view»
For -e
Run on Thu Jun 30 16:16:00 2016
Reported on Thu Jun 30 16:16:08 2016

Filename | /home/s1/perl5/perlbrew/perls/perl-5.22.1/lib/site_perl/5.22.1/DateTime/Format/Alami/EN.pm
Statements | Executed 10017 statements in 75.6ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 3.98ms | 4.05ms | DateTime::Format::Alami::EN::::BEGIN@8DateTime::Format::Alami::EN::BEGIN@8
1 | 1 | 1 | 872µs | 971µs | DateTime::Format::Alami::EN::::BEGIN@7DateTime::Format::Alami::EN::BEGIN@7
1 | 1 | 1 | 788µs | 2.16ms | DateTime::Format::Alami::EN::::BEGIN@14DateTime::Format::Alami::EN::BEGIN@14
1 | 1 | 1 | 533µs | 5.94ms | DateTime::Format::Alami::EN::::BEGIN@91DateTime::Format::Alami::EN::BEGIN@91
1 | 1 | 1 | 39µs | 39µs | DateTime::Format::Alami::EN::::BEGIN@6DateTime::Format::Alami::EN::BEGIN@6
2 | 2 | 1 | 21µs | 21µs | DateTime::Format::Alami::EN::::CORE:qrDateTime::Format::Alami::EN::CORE:qr (opcode)
1 | 1 | 1 | 10µs | 25.4ms | DateTime::Format::Alami::EN::::BEGIN@92DateTime::Format::Alami::EN::BEGIN@92
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::__ANON__[:94]DateTime::Format::Alami::EN::__ANON__[:94]
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::__ANON__[:95]DateTime::Format::Alami::EN::__ANON__[:95]
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::_parse_numDateTime::Format::Alami::EN::_parse_num
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::o_ampmDateTime::Format::Alami::EN::o_ampm
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::o_cardinal_suffixDateTime::Format::Alami::EN::o_cardinal_suffix
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::o_dateDateTime::Format::Alami::EN::o_date
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::o_numDateTime::Format::Alami::EN::o_num
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::p_date_timeDateTime::Format::Alami::EN::p_date_time
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::p_dateymdDateTime::Format::Alami::EN::p_dateymd
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::p_dur_agoDateTime::Format::Alami::EN::p_dur_ago
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::p_dur_laterDateTime::Format::Alami::EN::p_dur_later
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::p_nowDateTime::Format::Alami::EN::p_now
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::p_timeDateTime::Format::Alami::EN::p_time
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::p_todayDateTime::Format::Alami::EN::p_today
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::p_tomorrowDateTime::Format::Alami::EN::p_tomorrow
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::p_which_dowDateTime::Format::Alami::EN::p_which_dow
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::p_yesterdayDateTime::Format::Alami::EN::p_yesterday
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_aprDateTime::Format::Alami::EN::w_apr
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_augDateTime::Format::Alami::EN::w_aug
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_dayDateTime::Format::Alami::EN::w_day
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_decDateTime::Format::Alami::EN::w_dec
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_febDateTime::Format::Alami::EN::w_feb
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_fridayDateTime::Format::Alami::EN::w_friday
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_hourDateTime::Format::Alami::EN::w_hour
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_janDateTime::Format::Alami::EN::w_jan
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_julDateTime::Format::Alami::EN::w_jul
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_junDateTime::Format::Alami::EN::w_jun
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_marDateTime::Format::Alami::EN::w_mar
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_mayDateTime::Format::Alami::EN::w_may
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_minuteDateTime::Format::Alami::EN::w_minute
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_mondayDateTime::Format::Alami::EN::w_monday
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_monthDateTime::Format::Alami::EN::w_month
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_novDateTime::Format::Alami::EN::w_nov
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_octDateTime::Format::Alami::EN::w_oct
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_saturdayDateTime::Format::Alami::EN::w_saturday
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_secondDateTime::Format::Alami::EN::w_second
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_sepDateTime::Format::Alami::EN::w_sep
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_sundayDateTime::Format::Alami::EN::w_sunday
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_thursdayDateTime::Format::Alami::EN::w_thursday
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_tuesdayDateTime::Format::Alami::EN::w_tuesday
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_wednesdayDateTime::Format::Alami::EN::w_wednesday
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_weekDateTime::Format::Alami::EN::w_week
0 | 0 | 0 | 0s | 0s | DateTime::Format::Alami::EN::::w_yearDateTime::Format::Alami::EN::w_year

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package DateTime::Format::Alami::EN;
2 |  |  |  |  |
3 | 1 | 900ns |  |  | our $DATE = '2016-06-30'; # DATE
4 | 1 | 200ns |  |  | our $VERSION = '0.11'; # VERSION
5 |  |  |  |  |
6 | 2 | 85µs | 1 | 39µs | # spent 39µs within DateTime::Format::Alami::EN::BEGIN@6 which was called: # once (39µs+0s) by main::BEGIN@0 at line 6 use 5.014000; # spent 39µs making 1 call to DateTime::Format::Alami::EN::BEGIN@6
7 | 2 | 595µs | 2 | 976µs | # spent 971µs (872+98) within DateTime::Format::Alami::EN::BEGIN@7 which was called: # once (872µs+98µs) by main::BEGIN@0 at line 7 use strict; # spent 971µs making 1 call to DateTime::Format::Alami::EN::BEGIN@7 # spent 6µs making 1 call to strict::import
8 | 2 | 3.85ms | 2 | 4.06ms | # spent 4.05ms (3.98+71µs) within DateTime::Format::Alami::EN::BEGIN@8 which was called: # once (3.98ms+71µs) by main::BEGIN@0 at line 8 use warnings; # spent 4.05ms making 1 call to DateTime::Format::Alami::EN::BEGIN@8 # spent 13µs making 1 call to warnings::import
9 |  |  |  |  |
10 |  |  |  |  | # XXX holidays -> christmas | new year | ...
11 |  |  |  |  | # XXX timezone in time
12 |  |  |  |  | # XXX more patterns from DF:Natural
13 |  |  |  |  |
14 | 2 | 1.29ms | 2 | 2.24ms | # spent 2.16ms (788µs+1.37) within DateTime::Format::Alami::EN::BEGIN@14 which was called: # once (788µs+1.37ms) by main::BEGIN@0 at line 14 use Parse::Number::EN qw(parse_number_en); # spent 2.16ms making 1 call to DateTime::Format::Alami::EN::BEGIN@14 # spent 83µs making 1 call to Exporter::import
15 |  |  |  |  |
16 |  |  |  |  | sub o_num { $Parse::Number::EN::Pat }
17 |  |  |  |  | sub _parse_num { parse_number_en(text => $_[1]) }
18 |  |  |  |  | sub w_year { ["year", "years", "y"] }
19 |  |  |  |  | sub w_month { ["month", "months", "mon"] }
20 |  |  |  |  | sub w_week { ["week", "weeks", "wk", "wks"] }
21 |  |  |  |  | sub w_day { ["day", "days", "d"] }
22 |  |  |  |  | sub w_hour { ["hour", "hours", "h"] }
23 |  |  |  |  | sub w_minute { ["minute", "minutes", "min", "mins"] }
24 |  |  |  |  | sub w_second { ["second", "seconds", "sec", "secs", "s"] }
25 |  |  |  |  |
26 |  |  |  |  | sub w_jan { ["january", "jan"] }
27 |  |  |  |  | sub w_feb { ["february", "feb"] }
28 |  |  |  |  | sub w_mar { ["march", "mar"] }
29 |  |  |  |  | sub w_apr { ["april", "apr"] }
30 |  |  |  |  | sub w_may { ["may"] }
31 |  |  |  |  | sub w_jun { ["june", "jun"] }
32 |  |  |  |  | sub w_jul { ["july", "jul"] }
33 |  |  |  |  | sub w_aug { ["august", "aug"] }
34 |  |  |  |  | sub w_sep { ["september", "sept", "sep"] }
35 |  |  |  |  | sub w_oct { ["october", "oct"] }
36 |  |  |  |  | sub w_nov { ["november", "nov"] }
37 |  |  |  |  | sub w_dec { ["december", "dec"] }
38 |  |  |  |  |
39 |  |  |  |  | sub w_monday { ["monday", "mon"] }
40 |  |  |  |  | sub w_tuesday { ["tuesday", "tue"] }
41 |  |  |  |  | sub w_wednesday { ["wednesday", "wed"] }
42 |  |  |  |  | sub w_thursday { ["thursday", "thu"] }
43 |  |  |  |  | sub w_friday { ["friday", "fri"] }
44 |  |  |  |  | sub w_saturday { ["saturday", "sat"] }
45 |  |  |  |  | sub w_sunday { ["sunday", "sun"] }
46 |  |  |  |  |
47 |  |  |  |  | sub p_now { "(?:(?:(?:right|just) \\s+ )?now|immediately)" }
48 |  |  |  |  | sub p_today { "(?:today|this \\s+ day)" }
49 |  |  |  |  | sub p_tomorrow { "(?:tomorrow|tom)" }
50 |  |  |  |  | sub p_yesterday { "(?:yesterday|yest)" }
51 |  |  |  |  |
52 |  |  |  |  | sub o_cardinal_suffix { '(?:\s*(?:th|nd|st))' }
53 |  |  |  |  |
54 |  |  |  |  | sub p_dateymd { join(
55 |  |  |  |  | # we use the 'local' trick here in embedded code (see perlre) to be
56 |  |  |  |  | # backtrack-safe. we want to unset $m->{o_yearint} when date does not
57 |  |  |  |  | # contain year. $m->{o_yearint} might be set when we try the patterns but
58 |  |  |  |  | # might end up needing to be unset if the matching pattern ends up not
59 |  |  |  |  | # having year.
60 |  |  |  |  | "",
61 |  |  |  |  | '(?{ $DateTime::Format::Alami::_has_year = 0 })',
62 |  |  |  |  | '(?: <o_dayint><o_cardinal_suffix>? (?:\\s*|[ /-]) <o_monthname> | <o_monthname> (?:\\s*|[ /-]) <o_dayint><o_cardinal_suffix>?\\b | <o_monthint>[/-]<o_dayint>\\b )',
63 |  |  |  |  | '(?: \\s*[,/-]?\\s* <o_yearint> (?{ local $DateTime::Format::Alami::_has_year = $DateTime::Format::Alami::_has_year + 1 }))?',
64 |  |  |  |  | '(?{ delete $DateTime::Format::Alami::m->{o_yearint} unless $DateTime::Format::Alami::_has_year })',
65 |  |  |  |  | )}
66 |  |  |  |  |
67 |  |  |  |  | sub p_dur_ago { "<o_dur> \\s+ (?:ago)" }
68 |  |  |  |  | sub p_dur_later { "<o_dur> \\s+ (?:later) | in \\s+ <o_dur>" }
69 |  |  |  |  |
70 |  |  |  |  | sub p_which_dow { join(
71 |  |  |  |  | "",
72 |  |  |  |  | '(?{ $DateTime::Format::Alami::_offset = 0 })',
73 |  |  |  |  | "(?:",
74 |  |  |  |  | ' (?: (?:last \s+)(?{ local $DateTime::Format::Alami::_offset = -1 }) | (?:next \s+)(?{ local $DateTime::Format::Alami::_offset = 1 }) | (?:this \s+)?)',
75 |  |  |  |  | ' <o_dow>',
76 |  |  |  |  | ")",
77 |  |  |  |  | '(?{ $DateTime::Format::Alami::m->{offset} = $DateTime::Format::Alami::_offset })',
78 |  |  |  |  | )}
79 |  |  |  |  |
80 |  |  |  |  | sub o_date { "(?: <p_which_dow>|<p_today>|<p_tomorrow>|<p_yesterday>|<p_dateymd>)" }
81 |  |  |  |  | sub o_ampm { "(?: am|pm)" }
82 |  |  |  |  | sub p_time { "(?: <o_hour>[:.]<o_minute>(?: [:.]<o_second>)? \\s* <o_ampm>?)" } # XXX am/pm
83 |  |  |  |  | sub p_date_time { "(?:<o_date> \\s+ (?:(?:on|at) \\s+)? <p_time>)" }
84 |  |  |  |  |
85 |  |  |  |  | # the ordering is a bit weird because: we need to apply role at compile-time
86 |  |  |  |  | # before the precomputed $RE mentions $o & $m thus creating the package
87 |  |  |  |  | # DateTime::Format::Alami and this makes Role::Tiny::With complains that DT:F:A
88 |  |  |  |  | # is not a role. then, if we are to apply the role, we need to already declare
89 |  |  |  |  | # the methods required by the role.
90 |  |  |  |  |
91 | 2 | 306µs | 2 | 5.99ms | # spent 5.94ms (533µs+5.41) within DateTime::Format::Alami::EN::BEGIN@91 which was called: # once (533µs+5.41ms) by main::BEGIN@0 at line 91 use Role::Tiny::With; # spent 5.94ms making 1 call to DateTime::Format::Alami::EN::BEGIN@91 # spent 51µs making 1 call to Exporter::import
92 | 1 | 2.03ms | 2 | 50.8ms | # spent 25.4ms (10µs+25.4) within DateTime::Format::Alami::EN::BEGIN@92 which was called: # once (10µs+25.4ms) by main::BEGIN@0 at line 92 BEGIN { with 'DateTime::Format::Alami' }; # spent 25.4ms making 1 call to DateTime::Format::Alami::EN::BEGIN@92 # spent 25.4ms making 1 call to Role::Tiny::With::with
93 |  |  |  |  |
94 | 10001 | 67.4ms | 3001 | 2.46s | our $RE_DT = qr(((?&top))(?(DEFINE)(?<top>(?&p_date_time)|(?&p_dur_later)|(?&p_dur_ago)|(?&p_time)|(?&p_which_dow)|(?&p_today)|(?&p_tomorrow)|(?&p_yesterday)|(?&p_dateymd)|(?&p_now))(?<p_date_time> (\b (?:(?&o_date) \s+ (?:(?:on|at) \s+)? (?&p_time)) \b)(?{ $DateTime::Format::Alami::m->{p_date_time} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "p_date_time"; $DateTime::Format::Alami::o->a_date_time($DateTime::Format::Alami::m) }))(?<p_dur_later> (\b (?&o_dur) \s+ (?:later) | in \s+ (?&o_dur) \b)(?{ $DateTime::Format::Alami::m->{p_dur_later} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "p_dur_later"; $DateTime::Format::Alami::o->a_dur_later($DateTime::Format::Alami::m) }))(?<p_dur_ago> (\b (?&o_dur) \s+ (?:ago) \b)(?{ $DateTime::Format::Alami::m->{p_dur_ago} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "p_dur_ago"; $DateTime::Format::Alami::o->a_dur_ago($DateTime::Format::Alami::m) }))(?<o_date> ((?: (?&p_which_dow)|(?&p_today)|(?&p_tomorrow)|(?&p_yesterday)|(?&p_dateymd)))(?{ $DateTime::Format::Alami::m->{o_date} = $^N }))(?<p_time> (\b (?: (?&o_hour)[:.](?&o_minute)(?: [:.](?&o_second))? \s* (?&o_ampm)?) \b)(?{ $DateTime::Format::Alami::m->{p_time} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "p_time"; $DateTime::Format::Alami::o->a_time($DateTime::Format::Alami::m) }))(?<o_dur> ((?:((?:[+-]?(?:(?:\d{1,3}(?:[,]\d{3})+|\d+)(?:[.]\d*)?|[.]\d+)(?:[Ee][+-]?\d+)?)\s*(?:year|years|y|month|months|mon|week|weeks|wk|wks|day|days|d|hour|hours|h|minute|minutes|min|mins|second|seconds|sec|secs|s)\s*(?:,\s*)?)+))(?{ $DateTime::Format::Alami::m->{o_dur} = $^N }))(?<p_which_dow> (\b (?{ $DateTime::Format::Alami::_offset = 0 })(?: (?: (?:last \s+)(?{ local $DateTime::Format::Alami::_offset = -1 }) | (?:next \s+)(?{ local $DateTime::Format::Alami::_offset = 1 }) | (?:this \s+)?) (?&o_dow))(?{ $DateTime::Format::Alami::m->{offset} = $DateTime::Format::Alami::_offset }) \b)(?{ $DateTime::Format::Alami::m->{p_which_dow} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "p_which_dow"; $DateTime::Format::Alami::o->a_which_dow($DateTime::Format::Alami::m) }))(?<p_today> (\b (?:today|this \s+ day) \b)(?{ $DateTime::Format::Alami::m->{p_today} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "p_today"; $DateTime::Format::Alami::o->a_today($DateTime::Format::Alami::m) }))(?<p_tomorrow> (\b (?:tomorrow|tom) \b)(?{ $DateTime::Format::Alami::m->{p_tomorrow} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "p_tomorrow"; $DateTime::Format::Alami::o->a_tomorrow($DateTime::Format::Alami::m) }))(?<p_yesterday> (\b (?:yesterday|yest) \b)(?{ $DateTime::Format::Alami::m->{p_yesterday} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "p_yesterday"; $DateTime::Format::Alami::o->a_yesterday($DateTime::Format::Alami::m) }))(?<p_dateymd> (\b (?{ $DateTime::Format::Alami::_has_year = 0 })(?: (?&o_dayint)(?&o_cardinal_suffix)? (?:\s*|[ /-]) (?&o_monthname) | (?&o_monthname) (?:\s*|[ /-]) (?&o_dayint)(?&o_cardinal_suffix)?\b | (?&o_monthint)[/-](?&o_dayint)\b )(?: \s*[,/-]?\s* (?&o_yearint) (?{ local $DateTime::Format::Alami::_has_year = $DateTime::Format::Alami::_has_year + 1 }))?(?{ delete $DateTime::Format::Alami::m->{o_yearint} unless $DateTime::Format::Alami::_has_year }) \b)(?{ $DateTime::Format::Alami::m->{p_dateymd} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "p_dateymd"; $DateTime::Format::Alami::o->a_dateymd($DateTime::Format::Alami::m) }))(?<o_hour> ((?:[0-9][0-9]?))(?{ $DateTime::Format::Alami::m->{o_hour} = $^N }))(?<o_minute> ((?:[0-9][0-9]?))(?{ $DateTime::Format::Alami::m->{o_minute} = $^N }))(?<o_second> ((?:[0-9][0-9]?))(?{ $DateTime::Format::Alami::m->{o_second} = $^N }))(?<o_ampm> ((?: am|pm))(?{ $DateTime::Format::Alami::m->{o_ampm} = $^N }))(?<o_dow> ((?:monday|mon|tuesday|tue|wednesday|wed|thursday|thu|friday|fri|saturday|sat|sunday|sun))(?{ $DateTime::Format::Alami::m->{o_dow} = $^N }))(?<o_monthname> ((?:january|jan|february|feb|march|mar|april|apr|may|june|jun|july|jul|august|aug|september|sept|sep|october|oct|november|nov|december|dec))(?{ $DateTime::Format::Alami::m->{o_monthname} = $^N }))(?<o_cardinal_suffix> ((?:\s*(?:th|nd|st)))(?{ $DateTime::Format::Alami::m->{o_cardinal_suffix} = $^N }))(?<o_monthint> ((?:0?[1-9]|1[012]))(?{ $DateTime::Format::Alami::m->{o_monthint} = $^N }))(?<o_dayint> ((?:[12][0-9]|3[01]|0?[1-9]))(?{ $DateTime::Format::Alami::m->{o_dayint} = $^N }))(?<o_yearint> ((?:[0-9]{4}|[0-9]{2}))(?{ $DateTime::Format::Alami::m->{o_yearint} = $^N }))(?<o_timedur> ((?:((?:[+-]?(?:(?:\d{1,3}(?:[,]\d{3})+|\d+)(?:[.]\d*)?|[.]\d+)(?:[Ee][+-]?\d+)?)\s*(?:hour|hours|h|minute|minutes|min|mins|second|seconds|sec|secs|s)\s*(?:,\s*)?)+))(?{ $DateTime::Format::Alami::m->{o_timedur} = $^N }))(?<p_now> (\b (?:(?:(?:right|just) \s+ )?now|immediately) \b)(?{ $DateTime::Format::Alami::m->{p_now} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "p_now"; $DateTime::Format::Alami::o->a_now($DateTime::Format::Alami::m) }))(?<o_durwords> ((?:year|years|y|month|months|mon|week|weeks|wk|wks|day|days|d|hour|hours|h|minute|minutes|min|mins|second|seconds|sec|secs|s))(?{ $DateTime::Format::Alami::m->{o_durwords} = $^N }))(?<o_num> ((?:[+-]?(?:(?:\d{1,3}(?:[,]\d{3})+|\d+)(?:[.]\d*)?|[.]\d+)(?:[Ee][+-]?\d+)?))(?{ $DateTime::Format::Alami::m->{o_num} = $^N }))(?<o_timedurwords> ((?:hour|hours|h|minute|minutes|min|mins|second|seconds|sec|secs|s))(?{ $DateTime::Format::Alami::m->{o_timedurwords} = $^N }))))ix; # PRECOMPUTED FROM: do { DateTime::Format::Alami::EN->new; $DateTime::Format::Alami::EN::RE_DT } # spent 2.46s making 3000 calls to DateTime::Format::Alami::a_dateymd, avg 821µs/call # spent 18µs making 1 call to DateTime::Format::Alami::EN::CORE:qr
95 | 1 | 14µs | 1 | 2µs | our $RE_DUR = qr((?&top)(?(DEFINE)(?<top>(?&pdur_dur))(?<pdur_dur> (\b (?:(?&odur_dur)) \b)(?{ $DateTime::Format::Alami::m->{pdur_dur} = $^N })(?{ $DateTime::Format::Alami::o->{_pat} = "pdur_dur"; $DateTime::Format::Alami::o->adur_dur($DateTime::Format::Alami::m) }))(?<odur_dur> ((?:((?:[+-]?(?:(?:\d{1,3}(?:[,]\d{3})+|\d+)(?:[.]\d*)?|[.]\d+)(?:[Ee][+-]?\d+)?)\s*(?:year|years|y|month|months|mon|week|weeks|wk|wks|day|days|d|hour|hours|h|minute|minutes|min|mins|second|seconds|sec|secs|s)\s*(?:,\s*)?)+))(?{ $DateTime::Format::Alami::m->{odur_dur} = $^N }))))ix; # PRECOMPUTED FROM: do { DateTime::Format::Alami::EN->new; $DateTime::Format::Alami::EN::RE_DUR } # spent 2µs making 1 call to DateTime::Format::Alami::EN::CORE:qr
96 | 1 | 16µs |  |  | our $MAPS = {dow=>{fri=>5,friday=>5,mon=>1,monday=>1,sat=>6,saturday=>6,sun=>7,sunday=>7,thu=>4,thursday=>4,tue=>2,tuesday=>2,wed=>3,wednesday=>3},months=>{apr=>4,april=>4,aug=>8,august=>8,dec=>12,december=>12,feb=>2,february=>2,jan=>1,january=>1,jul=>7,july=>7,jun=>6,june=>6,mar=>3,march=>3,may=>5,nov=>11,november=>11,oct=>10,october=>10,sep=>9,sept=>9,september=>9}}; # PRECOMPUTED FROM: do { DateTime::Format::Alami::EN->new; $DateTime::Format::Alami::EN::MAPS }
97 |  |  |  |  |
98 | 1 | 13µs |  |  | 1;
99 |  |  |  |  | # ABSTRACT: Parse human date/time/duration expression (English)
100 |  |  |  |  |
101 |  |  |  |  | __END__
|  |  |  |  | # spent 21µs within DateTime::Format::Alami::EN::CORE:qr which was called 2 times, avg 10µs/call: # once (18µs+0s) by main::BEGIN@0 at line 94 # once (2µs+0s) by main::BEGIN@0 at line 95 sub DateTime::Format::Alami::EN::CORE:qr; # opcode