in reply to package inside .pl
The problem is that the line use XX::Blah; is instructing Perl to search for a file Blah.pm located in a subdirectory XX within one of the library subdirs described by %INC.
To use a package that is included in the current source file, you don't need to ask Perl to find it for you, it already knows where it is. So don't use it, just use it :).
#! perl -slw use strict; package XX::Blah; sub new { return bless { proof=>'You got me!' } , shift; } sub proof { my $self = shift; print $self->{proof}; } package main; my $test = new XX::Blah; $test->proof(); __END__ # Output C:\test>216900 You got me! C:\test>
Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.
|
|---|