jeanluca has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks
maybe this is a stupid question, but I was just reading through the module Calc.pm (from Date::Calc) It exports a lot of subs, but they are not defined in this file. Where are they and how does perl know where day are ?

Thanks
Luca

Replies are listed 'Best First'.
Re: where are the subs in this module ?
by Anonymous Monk on Feb 13, 2006 at 09:13 UTC
    Date::Calc uses C- and XS-Code. These files contain the methods. And Perl knows them, because it is loaded via the bootstrap in the Calc.pm (see DynaLoader)...
Re: where are the subs in this module ?
by jeanluca (Deacon) on Feb 13, 2006 at 09:21 UTC
    OK, I see. I found the C-library: /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/Date/Calc/Calc.so
    I guess it is not possible to obtain the source code ?

    Luca
      I guess it is not possible to obtain the source code ?

      Date::Calc is a CPAN module, its source is available from there. You can even see it online at search.cpan.org.