Wrappers Pass Arguments to Engines

2 wrappers and 1 engine handle 4 different cases. Here are the wrappers:

    sub display_profile {
        my $class = shift;
        if (@_) {
            my @requested = @_;
            _profile_engine($class, \@requested);
        } else {
            _profile_engine($class, 'all');
        }
    }
    sub write_profile {
        my $class = shift;
        if (@_) {
            my @requested = @_;
            _profile_engine($class, \@requested, 'write');
        } else {
            _profile_engine($class, 'all', 'write');
        }
    }

Previous Back to start of show Next
Slide: 21 4_cases © 2003 James E. Keenan