Create inline classes in Perl 5