On Tuesday, May 28, 2002, at 12:03 , Jason Frisvold wrote:
[..]
>
> Undefined subroutine &TicketEmail::set_path_information called at
> /usr2/local/PerlModules/TicketEmail.pm line 30.

here is a part of your problem - you neither exported 'set_path_info'
from the 'library.pm' file - so that the compiler would know to
check for it there, nor did you expressly call it out in
your TicketEmail.pm as being 'an extern'....

[..]
>
> Ugh... longwinded, but I think I got everything right....  Is this
> doable?  Or should I direct him to a programming class?  *grin*

a good place to start the reading would be:

        http://perl.plover.com/FAQs/Namespaces.html

[..]
yes, but you will want to think about some of the problems
that you have spawned for yourself....

the problem is that while

        use library;

would be somewhat useful - the complication here is
that your

        library.pm

is not really a 'perl module' since it is not exporting
anything back - merely sorta declaring that it has something
like a function....

if you did say

        package library

        sub hide_vals {

                my $path1 = '/some/where';
                my $path2 = '/some/where/else';

                return($path1, $path2) ; # this makes it at least like a method

        }

and then in your mypackage.pm
were to guard for them with say

        my ($p1, $p2) = &library::hide_vals ; # expressly call their function.

then you would be able to get them into your
mypackage.pm - for re-use else where.


does that give you a way to start reconsidering it????



ciao
drieux

---


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

Reply via email to