Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    my $factory = Factory->new( config_file => "file.xml" );
    my $obj1 = $factory->make_object_from_data( { foo=>123 } );
    my $obj2 = $factory->make_object_from_data( { bar=>456 } );
    
  2. or download this
    use warnings;
    use strict;
    ...
    my $config = Config->new( config_file => "file.xml" );
    my $obj1 = Object->new( config => $config, data => { foo=>123 } );
    my $obj2 = Object->new( config => $config, data => { bar=>456 } );
    
  3. or download this
        sub new_object {
            my ($self,$data) = @_;
    ...
    
    # ... call as:
    my $obj3 = $config->new_object( { quz=>789 } );