in reply to Undefined subroutine - newbie problem

This is package:
package Abc; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(simple); sub simple { print "\nThis is package Abc and function is simple() \n"; } 1;
and this is code that uses this package:
use Abc; simple();

Replies are listed 'Best First'.
Re^2: Undefined subroutine - newbie problem
by blackhat (Novice) on Aug 14, 2012 at 11:37 UTC
    thank you, I have done like that in last exc, but now I am obliged to use "require" :(
        hm... still doesn't seem to be solution: Undefined subroutine &main::generate_throws_simple called at (...) and the code:
        use strict; use warnings; use vars qw($a $b @wyniki); $a = 6; #kostka $b = 10; #licznik @wyniki = (); require gts; #generate_throws_simple require pts; #print_throws_simple gts->import(); pts->import(); print "\n-------------------STANDARDOWE LOSOWANIE----------------\n"; print_throws_simple(generate_throws_simple($a,$b)); #standardowe losow +anie
        and gts/pts code (just that important):
        require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(print_throws_simple); # symbols automatically exporte +d our @EXPORT_OK = qw(); # symbols exported on request our %EXPORT_TAGS = (); # TAG => [qw(name1 name2)] # ...............................................