| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package App::cdnget::Exception; | 
| 2 | 1 |  |  | 1 |  | 512 | use Object::Base qw(Object::Exception); | 
|  | 1 |  |  |  |  | 1812 |  | 
|  | 1 |  |  |  |  | 5 |  | 
| 3 | 1 |  |  | 1 |  | 3607 | use v5.14; | 
|  | 1 |  |  |  |  | 2 |  | 
| 4 | 1 |  |  | 1 |  | 4 | use bytes; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 7 |  | 
| 5 | 1 |  |  | 1 |  | 16 | use DateTime; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 36 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | BEGIN | 
| 9 |  |  |  |  |  |  | { | 
| 10 | 1 |  |  | 1 |  | 97 | our $VERSION     = '0.03'; | 
| 11 |  |  |  |  |  |  | } | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | sub msg :lvalue | 
| 15 |  |  |  |  |  |  | { | 
| 16 | 0 |  |  | 0 | 0 |  | my $self = shift; | 
| 17 | 0 |  |  |  |  |  | my ($msg) = @_; | 
| 18 | 0 |  |  |  |  |  | my @args = @_; | 
| 19 | 0 | 0 | 0 |  |  |  | if (@args >= 1 and not ref($msg)) | 
| 20 |  |  |  |  |  |  | { | 
| 21 | 0 | 0 |  |  |  |  | $msg = "Unknown" unless $msg; | 
| 22 | 0 |  |  |  |  |  | my $dts = DateTime->now(time_zone => POSIX::strftime("%z", localtime), locale => "en")->strftime('%x %T %z'); | 
| 23 | 0 |  |  |  |  |  | $msg = "[$dts] $msg"; | 
| 24 | 0 |  |  |  |  |  | $args[0] = $msg; | 
| 25 |  |  |  |  |  |  | } | 
| 26 | 0 |  |  |  |  |  | $self->SUPER::msg(@args); | 
| 27 |  |  |  |  |  |  | } | 
| 28 |  |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | 1; | 
| 31 |  |  |  |  |  |  | __END__ | 
| 32 |  |  |  |  |  |  | =head1 REPOSITORY | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | B<GitHub> L<https://github.com/orkunkaraduman/p5-cdnget> | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | B<CPAN> L<https://metacpan.org/release/App-cdnget> | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | =head1 AUTHOR | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | Orkun Karaduman <orkunkaraduman@gmail.com> | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 43 |  |  |  |  |  |  |  | 
| 44 |  |  |  |  |  |  | Copyright (C) 2017  Orkun Karaduman <orkunkaraduman@gmail.com> | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | This program is free software: you can redistribute it and/or modify | 
| 47 |  |  |  |  |  |  | it under the terms of the GNU General Public License as published by | 
| 48 |  |  |  |  |  |  | the Free Software Foundation, either version 3 of the License, or | 
| 49 |  |  |  |  |  |  | (at your option) any later version. | 
| 50 |  |  |  |  |  |  |  | 
| 51 |  |  |  |  |  |  | This program is distributed in the hope that it will be useful, | 
| 52 |  |  |  |  |  |  | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 53 |  |  |  |  |  |  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
| 54 |  |  |  |  |  |  | GNU General Public License for more details. | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | You should have received a copy of the GNU General Public License | 
| 57 |  |  |  |  |  |  | along with this program.  If not, see <http://www.gnu.org/licenses/>. | 
| 58 |  |  |  |  |  |  |  | 
| 59 |  |  |  |  |  |  | =cut |