------------------------------------------------
On Thu, 20 Mar 2003 14:06:56 -0000, "Rob Dixon" <[EMAIL PROTECTED]> wrote:

> Rob Dixon wrote:
> > > When I run perl -c on this, I get the following messages:
> > > Subroutine new redefined at Train.pm line 106.
> >
> > It's telling you that you have two definitions of ScheduleDay::new.
> > Presumably Train.pm has no 'package Train;' statement?
> 
> Wiggins' post got me to think a little more carefully, and it is clear
> that Train.pm is doing the redefining at its line 106, not ScheduleDay.
> That means that the definition must already exist when the 'use Train'
> statement in ScheduleDay is executed, as none of the Train code
> is executed anywhere else. Since 'use' is an implied BEGIN block I
> can't see any way this is possible.
> 
> Can you put me out of my misery Rob, and tell us what's on Train.pm
> line 106?
> 

I was hoping someone would correct me, if you have? ;-)  After reading Bob's e-mail I 
paid closer attention to the error and thought in terms of compile time rather than 
runtime... But I am a bit confused about the order of compiling, does the whole file 
get compiled, then the module, and then they get "linked" or is it sequential so that 
as soon as a non-previously compiled 'use' is reached, then the that is compiled and 
then returns to the original point to finish that file? This latter seems to make more 
sense, but then that doesn't mean it is the case. I really ought to read up more on 
Perl internals, but finding the time when I want to make my head hurt is difficult at 
best ;-)......

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to