in reply to Tk helps another package to export?

use base qw(...) is a synonym for @ISA = qw(Exporter...).

happy perling.

Update:this information is wrong. please ignore. :)

Replies are listed 'Best First'.
Re: Re: Tk helps another package to export?
by demerphq (Chancellor) on Jan 30, 2003 at 10:41 UTC
    Well, actually
    use base qw(Foo Bar);
    is more or less the same as
    BEGIN { require Foo; require Bar; push @ISA, qw(Foo Bar); }
    Which raises an interesting point, prototypes are not respected when a module is required. However they are when they are used.

    --- demerphq
    my friends call me, usually because I'm late....

      prototypes are not respected when a module is required. However they are when they are use

      Wrong. Prototypes are not respected if they are defined too late (i.e. not in the compile time). In this case require is wrapped in BEGIN block so it is the compile time.

      --
      Ilya Martynov, ilya@iponweb.net
      CTO IPonWEB (UK) Ltd
      Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
      Personal website - http://martynov.org

        Thanks for the clarification.

        :-)

        --- demerphq
        my friends call me, usually because I'm late....

Re: Re: Tk helps another package to export?
by tall_man (Parson) on Jan 30, 2003 at 01:21 UTC
    But the "use base" is in package Tk, so the @ISA should have been a @Tk::ISA and not a @Constants::ISA. It still doesn't make sense to me.