Re: Better perl docs?

From: Gunnar Hjalmarsson (noreply_at_gunnar.cc)
Date: 03/21/04


Date: Sun, 21 Mar 2004 22:47:56 GMT

Joe Cosby wrote:
> For instance, I am writing a script which needs date/time
> functionality. I am using perldoc.com to try to find out what I
> have available and how it works, so I found the Time::localtime
> package docs here
>
> http://www.perldoc.com/perl5.8.0/lib/Time/localtime.html
>
> (I know localtime() doesn't necessarily need the wrapper class, but
> just for example ... )
>
> It doesn't really tell me much, not as much as I need, anyway.
> What are the members of the class? What are the methods? Two
> methods are mentioned in passing ... apparently there's a
> localtime->year() method, but what other methods are available?
> year() appears to return a centuryless year, are there other
> methods that return a year with century?

Well, the quality of the Perl module docs varies, and the docs for the
Time::localtime module is apparently not one of the better.

> In this particular case I can probably guess my way through it; I
> need to build a string of the form YYYYMMDD

If that's all there is, personally I would probably have done it
without using a module, i.e. something like Will's suggestion. Another
option is to explore another module, such as Time::Format.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


Relevant Pages

  • Re: Better perl docs?
    ... I am writing a script which needs date/time ... > functionality. ... > doesn't necessarily need the wrapper class, ...
    (perl.beginners)
  • Re: sub-array references?
    ... The wrapper class would contain a reference to the array, ... Any functionality that the wrapper ... Just an idea, but couldn't you make an explicit or implicit conversion from this wrapper class to an int[] or whatever, and make a new intwhen the conversion is needed? ...
    (microsoft.public.dotnet.languages.csharp)
  • class not registered in service app
    ... .NET services, yet!). ... I have a wrapper class that encapsulates this ... functionality that has been tested in a console application. ... When I instantiate the instance of my wrapper class, ...
    (microsoft.public.dotnet.framework)