An Introduction to Class::DBI - Introduction 5

The Problem

Error Prone

  • embedding one language (SQL) into another (Perl) is:

    • error prone

      • Common SQL statements written over and over again, scattered through Perl code, typos likely

      • errors caught at runtime

    • difficult to maintain

      • With SQL scattered all over code, how do you make global database changes:

        • rename a column or table

        • add a column to a table

      • errors caught at runtime

    • difficult to test

      • can't just test the database or the application - have to test them together

 

YAPC::Canada << Previous | Index | Next >>
Copyright © 2003 Michael Graham