"Fossies" - the Fresh Open Source Software Archive

Member "Date-Calc-6.4/lib/Date/Calc.pm" (7 Mar 2015, 2135 Bytes) of package /linux/privat/Date-Calc-6.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Calc.pm" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 6.3_vs_6.4.

    1 
    2 ###############################################################################
    3 ##                                                                           ##
    4 ##    Copyright (c) 1995 - 2015 by Steffen Beyer.                            ##
    5 ##    All rights reserved.                                                   ##
    6 ##                                                                           ##
    7 ##    This package is free software; you can redistribute it                 ##
    8 ##    and/or modify it under the same terms as Perl itself.                  ##
    9 ##                                                                           ##
   10 ###############################################################################
   11 
   12 package Date::Calc;
   13 
   14 use strict;
   15 use vars qw($XS_OK $XS_DISABLE @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
   16 
   17 BEGIN # Re-export imports from Date::Calc::XS or Date::Calc::PP:
   18 {
   19     require Exporter;
   20     @ISA = qw(Exporter);
   21     $XS_OK = 0;
   22     unless ($XS_DISABLE and $XS_DISABLE) # prevent warning "used only once"
   23     {
   24         eval
   25         {
   26             require Date::Calc::XS;
   27             @EXPORT      = (@Date::Calc::XS::EXPORT);
   28             @EXPORT_OK   = (@Date::Calc::XS::EXPORT_OK);
   29             %EXPORT_TAGS = (all => [@EXPORT_OK]);
   30             Date::Calc::XS->import(@EXPORT,@EXPORT_OK);
   31         };
   32         if ($@) { die $@ unless ($@ =~ /^Can't locate .*? at /); }
   33         else    { $XS_OK = 1; }
   34     }
   35     unless ($XS_OK)
   36     {
   37         require Date::Calc::PP;
   38         @EXPORT      = (@Date::Calc::PP::EXPORT);
   39         @EXPORT_OK   = (@Date::Calc::PP::EXPORT_OK);
   40         %EXPORT_TAGS = (all => [@EXPORT_OK]);
   41         Date::Calc::PP->import(@EXPORT,@EXPORT_OK);
   42     }
   43 }
   44 
   45 ##################################################
   46 ##                                              ##
   47 ##  "Version()" is available but not exported   ##
   48 ##  in order to avoid possible name clashes.    ##
   49 ##  Call with "Date::Calc::Version()" instead!  ##
   50 ##                                              ##
   51 ##################################################
   52 
   53 $VERSION     = '6.4';
   54 
   55 sub Version { return $VERSION; }
   56 
   57 1;
   58 
   59 __END__
   60