A shell for a new Perl MySQL program

MySQL Perl script skeleton

Brian Aker recently wrote about a “skeleton project” for quickly boot-strapping a development environment for a new software project. I do something similar for Perl programs that I want to connect to MySQL.

Brian’s skeleton project is different from mine. Mine is just a skeleton for a Perl script, not an entire software project. But perhaps you’ll find it useful anyway.

The code included in the file takes care of getting all the info you need to connect to a MySQL instance. By default, it starts by opening and reading your .my.cnf file if it exists. If it can’t find that, it asks you for any missing information (username, password, etc). There’s a section for generating a command-line help output, and a section where you can add more command-line options easily. And finally, it actually opens a DBI connection to a MySQL instance, in case you can’t remember the syntax (I never can).

I haven’t fully commented what it does, but if you’re familiar with Perl it ought to be pretty self-evident. Let me know if I need to clarify anything. Enjoy!

bread machine breadman bread machine toastmaster bread machine panasonic bread machine cuisinart bread machine sunbeam bread machine oster bread machine west bend bread machine westinghouse bread machine regal ware bread machine indoor grill george foreman indoor grill hamilton beach indoor grill cuisinart indoor grill star manufacturing indoor grill anvil indoor grill presto indoor grill delonghi indoor grill cadco indoor grill eurodib indoor grill krups indoor grill sanyo indoor grill farberware indoor grill oster indoor grill breville indoor grill chefmaster indoor grill electric indoor grill sunbeam indoor grill sandwich maker george foreman sandwich maker cuisinart sandwich maker anvil sandwich maker toastmaster sandwich maker breville sandwich maker presto sandwich maker hamilton beach sandwich maker krups sandwich maker tefal sandwich maker delonghi sandwich maker durabrand sandwich maker diablo sandwich maker eletric sandwich maker oster sandwich maker waffle maker villaware waffle maker nemco waffle maker chefs choice waffle maker cuisinart waffle maker star manufacturing waffle maker gold medal waffle maker hamilton beach waffle maker toastmaster waffle maker oster waffle maker krups waffle maker belgian waffle maker kitchenaid waffle maker delonghi waffle maker george foreman waffle maker westinghouse waffle maker sunbeam waffle maker waffle iron villaware waffle iron nemco waffle iron chefs choice waffle iron cuisinart waffle iron star manufacturing waffle iron waring waffle iron gold medal waffle iron hamilton beach waffle iron toastmaster waffle iron oster waffle iron krups waffle iron belgian waffle iron black and decker waffle iron kitchenaid waffle iron delonghi waffle iron george foreman waffle iron sunbeam waffle iron pancaker maker perfect pancake maker toastmaster pancake maker george foreman pancake maker deep fryer frymaster deep fryer presto deep fryer rival deep fryer cecilware deep fryer gold medal deep fryer delonghi deep fryer wells deep fryer star manufacturing deep fryer tefal deep fryer anvil deep fryer anetsberger deep fryer dean deep fryer garland deep fryer imperial deep fryer keating deep fryer pitco deep fryer waring deep fryer electric deep fryer bravetti deep fryer oster deep fryer nesco deep fryer ge deep fryer black and decker deep fryer cuisinart deep fryer euro pro deep fryer hamilton beach deep fryer durabrand deep fryer sunbeam deep fryer
Technorati Tags:No Tags

You might also like:

  1. How to create a VB6 console program
  2. SSH public-key forwarding
  3. How to convert MySQL output to HTML tables
  4. How to track what owns a MySQL connection
  5. MySQL Toolkit released as one package

0 Responses to “A shell for a new Perl MySQL program”


  1. No Comments

Leave a Reply

Please do not use this blog to get help with problems or bugs in Maatkit or innotop: use the Sourceforge forums, mailing list, or bug trackers. If you're asking for help with MySQL, please use the MySQL mailing list instead. I'm writing a book and my time is extremely limited :-)