Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How to export multiple packages in one file to another Perl program?

by daxim (Curate)
on Oct 04, 2012 at 15:25 UTC ( [id://997250]=note: print w/replies, xml ) Need Help??


in reply to How to export multiple packages in one file to another Perl program?

Constants belong to a package and do not pass down inheritance, so this is not suitable for OO. You want read-only attributes.
package Object2; use Moose; has 'some_attr', is => 'ro', default => 42; ################## package main; my $o = Object2->new; $o->some_attr; # returns 42

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://997250]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-03-28 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found