Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub foo {
- my ($type, @params) = @_;
- my %valid_types = (
- foo => 'FOO',
- bar => 'BAR',
- baz => 'BAZ',
- );
- goto $valid_types{$type} if exists $valid_types{$type};
- die;
- {
- COUNTERPART_TO_CLEANUP { initialize };
- FOO: {
- return;
- }
- {
- COUNTERPART_TO_CLEANUP { initialize bar and baz only };
- BAR: { ...; return; }
- BAZ: { ...; return; }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement