The Code for today's show is availible at our: Github
Ivory Tower
Let's talk about CPAN - "The Comprehensive Perl Archive Network"
One of the greatest benefits of programing in a modern language like Perl is the fact that you can take advantage of the work of tens or hundreds of thousands (millions?) of other programmers. CPAN has more than 136k Perl modules that you can download and use without for free and without royalty. So let's figure out how to get a module from CPAN
Drop into the Command Line (or Terminal) Type: "perl - MCPAN -e shell" If you've never used CPAN before, you MAY get a message saying that it's downloading all the necessary packaged and repositories to make CPAN work. Let it download and install all the necessary packages Once it's done, you'll get a "cpan>" prompt. Now let's search for some modules! I'm going to look for LWP modules "LWP" is short for "Library for WWW in Perl" It's a set of very popular modules that allow you to access data on the World Wide Web. This will search for all LWP modules "i" will invoke a search /LWP is the argument for the search :: "/" tells it to look for ALL LWP modules "install (name of module) In our instance, I want to install the module called "LWP::UserAgent::POE" So I type: "install LWP:UserAgent:POE" Perl will automatically download the module, unzip it, install the package. Let it do it's thing... and you're ready to use the module! If you go to your Perl folder, you should be able to find the files that were just installed C:\Perl64\cpan\build\ Hosts: Fr. Robert Ballecer, SJ and Shannon Morse
Subscribe and get Coding 101 automatically at https://twit.tv/shows/coding-101 Follow PadreSJ and Snubs on Twitter Bandwidth for Coding 101 is provided by CacheFly.