13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

APPENDIX ■ PERL TIPS> wget http://search.cpan.org/CPAN/authors/id/R/RP/RPANMAN/Finance-Bank-Smile-0.05.tar.gz> tar zxf Finance-Bank-Smile-0.05.tar.gz> dh-make-perl Finance-Bank-Smile-0.05/If you look in Finance-Bank-Smile-0.05/debian, you’ll see various package-related files n there. Youcan edit these by hand, but the defaults should be fine for a personal, local package.■ Note Get more information about all of this at the Debian New Maintainer’s Guide:http://www.debian.org/doc/maint-guide/.Now build the module:> cd Finance-Bank-Smile-0.05; debuildIn your original top directory, there will now be a correctly named DEB file, libfinance-bank-smileperl_0.05-1_all.deb.Install with the following:> sudo dpkg -i libfinance-bank-smile-perl_0.05-1_all.deb■ Note It’s useful to bear in mind that CPAN doesn’t have any checks applied to uploads. Anyone can uploadanything they want. So, be careful when installing modules that you don’t know or that aren’t widely used. To getinformation on Perl modules, try http://cpanratings.perl.org/.Useful ModulesHere’s a quick list of some modules that you may find useful:• Authen::SASL: Provides SASL authentication modules (including GSSAPI, whichenables Kerberos authentication). See recipe 2-10 for details.• Data::Dumper::Simple: Dumps out your Perl data structure as a string or setof strings and will recurse if need be. This is very useful for debugging. Regardlessof what you think a variable must contain (even if you’re really, really sure...),the best thing you can do if it’s all going wrong is to actually look.Data::Dumper::Simple is a slight improvement over regular Data::Dumper,because it includes the name of the variable by default:use Data::Dumper::Simple;print STDERR Dumper($file, %datahash);248Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!