Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: Avoiding silly programming mistakes

by rir (Vicar)
on Aug 20, 2008 at 13:57 UTC ( #705513=note: print w/replies, xml ) Need Help??

in reply to Re: Avoiding silly programming mistakes
in thread Avoiding silly programming mistakes

Using a boilerplate to start a module will help with your problems with exportation and ultimate truth.

The trick to using such templates is to make them congenial; make your own. Avoid building a template which is more comprehensive than you will be willing to alter.

Here is what I'm currently using, minus pod.

package XXX_name; use 5.008004; use strict; use warnings; require Exporter; our $VERSION = '0.01'; use Carp; use vars ( 'XXX_exported', '@EXPORT' ); ## no critic use base qw/ Exporter /; @EXPORT = qw/ XXX_exported /; XXX_code_here 1;
Be well,

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://705513]
[1nickt]: Corion this looks good, from the pod: "there are 9000+ variations that are detected correctly in the test files (see t/data/* for most of them). If you can think of any that I do not cover, please let me know."
[TCLion]: some moron put the date like this : Mon Feb 20 09:31:30 2017
[Corion]: 1nickt: Yes, the module sounds promising indeed
[1nickt]: "putting the date in correct order" how?
[Corion]: TCLion: Whee ;)
[TCLion]: need to put like this : 2017-02-20 09:30:53
[1nickt]: That's why I asked if you are using DateTime. It has a large number of supporting modules (the author likes the term 'eco-system') so if you are already creating a DateTime obj from your dates, this module would read in the mnoron-formatted 1s seamlessly
[TCLion]: when I put the date together it looks like : 2017-Feb-24 (month is the problem)
[1nickt]: good luck, then.
[TCLion]: looking at DateTime documentation in monastery now

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2017-03-23 14:56 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (288 votes). Check out past polls.