in reply to Re: subroutine calls
in thread subroutine calls

hi monks,
package DIVISION; require Exporter; @local::ISA=(Exporter); @local::EXPORT=qw(divideInteger printer);
Can you explain in detail what does the 3rd and 4th lines mean??
Is that making two subroutines local to the package DIVISION.

Replies are listed 'Best First'.
Re^3: subroutine calls
by Fletch (Bishop) on Apr 14, 2006 at 12:18 UTC

    No, that's making two arrays (@ISA and @EXPORT) in the package local. You want

    package DIVISION; require Exporter; our @ISA = qw( Exporter ); our @EXPORT = qw( divideInteger printer );

    And to re-read the docs for Exporter.

Re^3: subroutine calls
by wazoox (Prior) on Apr 14, 2006 at 12:24 UTC
    Not at all. It makes the package DIVISION an "Exporter", and it actually exports the two subs to the caller's namespace. If you don't use Exporter, you'll have to call the subs this way :
    my $number = DIVISION::divideInterger(5,42); DIVISION::printer();