
#Constructor python software#
This is free software you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This software is copyright (c) 2012, 2014 by Toby Inkster. (Though it was SSCAFFIDI's idea.) COPYRIGHT AND LICENCE

If you don't want Acme::Constructor::Python to load the module, then set this option to true. Not straight away it waits until you actually perform an instantiation. The default is the last component of the module name, which is often sensible.Īcme::Constructor::Python will automatically load the module specified. The name of the function you want created for you.

The default is new which is usually correct. This is normally the same as the module name, and that's the default assumption, so there's no usually much point in providing it. OptionsĮach argument to the Acme::Constructor::Pythonic is a Perl module name and may be followed by a hashref of options: use Acme::Constructor::Pythonic The example in the SYNOPSIS creates three functions UserAgent, JSON and each of which just pass through their arguments to the real object constructors.

This module allows Python-like object instantiation in Perl. In Python you import classes like this: import BankAccount from bankingĪnd you instantiate them with something looking like a function call: acct = BankAccount(9.99) My $data = $json->decode( $ua->request($req)->content ) DESCRIPTION Acme::Constructor::Pythonic - import Python-style constructor functions SYNOPSIS use Acme::Constructor::Pythonic qw(
