Wise Monks, I find I have written code that works fine, at least it seems. But I cannot understand _why_ it works. It seems like it should not, there for I'm seeking understanding
I am generating a report, using PDF::API2. I've created myself a little helper object:
In my main file, I can use the constants, as well the AReport object:package AReport; use common::sense; use PDF::API2; use Exporter qw( import ); use constant mm => 25.4 / 72; use constant in => 1 / 72; use constant pt => 1; our @EXPORT = qw(mm in pt); use Class::Tiny qw(api x y pageW pageH bodyW bodyH); <etc...>
use AReport; my $pdf = AReport->new( file => 'junk.pdf', pageW => 8.5/in );
It all seems to work, but there should be two import() procedures, one for Class:Tiny and one for Exporter. Only one should get called, but seems as both do? How?
Thank you for your time,
-AndyIn reply to Class::Tiny and Exporter at the same time by jaandy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |