The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Package::Transporter::Generator::Constant_Function::Enumerated - generate constant functions with enumerated values

SYNOPSIS

        package Parent_Class;
        use Package::Transporter sub{eval shift}, sub {
                $_[0]->register_drain('::Enumerated', 'FOR_FAMILY',
                        'ATB_', qw(NAME  STOCK  PRICE));
        };
        
        package Child_Class;
        BEGIN {our @ISA = ('Parent_Class')}; # more like 'use parent ...'
        use Package::Transporter sub{eval shift}, sub {
                $_[0]->register_drain('::Enumerated', 'FOR_SELF',
                        'ATB_', qw(SALE));
        };
        
        print STDOUT 'ATB_PRICE=', ATB_PRICE, "\n";
        print STDOUT 'ATB_SALE=', ATB_SALE, "\n";
        exit(0);

DESCRIPTION

Enumeration is restarted in each affected package. (Caution: this is implicit drain.)

ANYTHING ELSE

Please see the documentation of the upstream package Package::Transporter.