Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: "Should be a simple thing" not going well for me

by sundialsvc4 (Abbot)
on Nov 03, 2011 at 14:11 UTC ( #935670=note: print w/replies, xml ) Need Help??

in reply to "Should be a simple thing" not going well for me

Try reading the POD.

/me nods ...

Unfortunately for the OP, BrowerUK’s admonition here is right on the mark.   Click on the link in this sentence to look at the description of Date::Manip::Date, and you will see, at the very beginning of that page in the SYNOPSIS section, that the too-brief example code uses the module, then instantiates a new object.   Unfortunately the synopsis is not complete:   it does not tell you what to do next.

Objects like these are designed to be instantiated, and then to provide the service of parseing a date string, thus obtaining its value (or throwing an error), and to answer questions about the value, and to print the formatted value.

In a case like this, I find that sometimes the best source of “but how does it actually work?” information is to look at the test-library (a directory t) within the package subdirectory.   Here you will find code that is designed to work as well as code that is designed to fail in certain ways.   Perl runs all of these tests before installing the module permanently.   They can be an excellent source of information, usually written by the author himself.

P.S.:   “Simple things” never are.

  • Comment on Re: "Should be a simple thing" not going well for me

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://935670]
and the fire pops...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2017-02-26 23:57 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (376 votes). Check out past polls.