YAPC::2004::Israel << Previous | Index | Next >> Copyright © 2004 Gaal Yahas

Refactoring with Class::Accessor - cont'd


  • now, we have our pretty flow function (in rather less than 500 lines), with assertion points, too:

     sub process_job {
         my $job = shift;
         $job->assert_populated('job_spec');
         $job->discover_customer_information();
         $job->assert_populated('cust');
         $job->calulate_extra_job_info();
         $job->assert_populated('job');
         # ...
     }

continued...