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 ( #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 (Abbot) 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 (Monsignor) 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
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? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2018-11-14 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (163 votes). Check out past polls.

    Notices?