#!/usr/bin/perl -w use strict; use Data::Dumper; use sam; use tes; # Create a sample my $sample = new sam(); $sample->sample_id("organite"); # Create a new test, name it, add it to the sample and increase it's status a couple of times my $test1 = new tes(); $test1->test_id("first"); $sample->add_test($test1); $test1->status("new", "me"); $test1->status("stage one", "me"); # Create ANOTHER new test, name it, add it to the sample and increase it's status a couple of times my $test2 = new tes(); $test2->test_id("second"); $sample->add_test($test2); $test2->status("new", "me"); $test2->status("stage one", "me"); # change test2 status $test2->status("stage four", "me"); # change test1 status, but not as high as test2 $test1->status("stage two", "me"); printf("\nSample History (%s)\n%s\n", $sample->sample_id(), $sample->status_history()); printf("\ntest1 is currently at: %s\n",$test1->current_status()); printf("\ntest2 is currently at: %s\n",$test2->current_status()); printf("\nsample is currently at: %s\n\n",$sample->current_status());