Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Github repo with plenty of module examples

by neilwatson (Priest)
on Feb 10, 2017 at 14:37 UTC ( [id://1181669]=CUFP: print w/replies, xml ) Need Help??

This site has large and hopefully growing number of code examples for Perl modules.

Neil Watson
watson-wilson.ca

  • Comment on Github repo with plenty of module examples

Replies are listed 'Best First'.
Re: Github repo with plenty of module examples
by stevieb (Canon) on Feb 10, 2017 at 15:44 UTC

    While we're sharing our examples, I have a boatload of one-off type example Perl scripts in my scripts repo here :)

    I think it's a good idea to share our one-off-type stuff!

      Here's couple of my scripts :-). I totally forgot about some of them so I updated the README file to refresh my memory.

      I don't care to belong to a club that accepts people like me as a member. -- Groucho Marx
Re: Github repo with plenty of module examples
by 1nickt (Canon) on Feb 10, 2017 at 14:55 UTC

    Cool idea. I wouldn't recommend that implementation as an example of good Perl style, though:


    my $date_1 = new DateTime (year => 2014, month => 7, day => 5);
    my $date_2 = new DateTime (year => 2014, month => 7, day =>15);
    
    # Calculate Δ
    #    delta_tays() returns a DateTime::Duration object
    printf "date_2 (%s) is %d days away from date_1 (%s)\n", $date_2 -> dmy, $date_1->delta_days($date_2)->delta_days, $date_1 -> dmy;
    
    my $today = today DateTime;
    
    printf "Tdoay is %s\n", $today->dmy;
    

    ( sic: https://github.com/ReneNyffenegger/PerlModules/blob/master/DateTime/script.pl )


    The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://1181669]
Approved by stevieb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found