in reply to Dealing with design -- inheritance + exporting gone bad :(..

However, when I try and run this piece of code I come up with a message stating:
"Undefined subroutine &model::MAKE_BASIS::inheir_merge"

Well, that's because this is a subroutine call:

$RULES = inheir_merge( exports => { # Environment variables to export at program's runtime. }, opts => { # A hash of options that get passed into a program. }, # Time limit for execution timeout => 12 );

and perl can't find a subroutine like

sub inheir_merge { # subroutine code here }

in the package model::MAKE_BASIS. Do you have that subroutine in a file you didn't post (model/MAKE_BASIS.pm) ? what is it supposed to do?

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: Dealing with design -- inheritance + exporting gone bad :(..
by yaneurabeya (Novice) on Jun 20, 2007 at 19:44 UTC

    I know -- unfortunately Exporter wasn't working as expected. My coworker and I found another method of solving the problem out of an O'Reilly book, but the problem is most simply solved by flattened and merging the objects, using a preset object name in the package.

    Sure, it means that errors may occur on occasion, but that's what I have error checking built into the classes for. The problem is better solved using the described method because this is a solution designed for ~20 some people, most who treat Perl like it's the plague.. I could go further into the discussion, but I don't think it's relevant to the topic anymore.

    Thanks for the attempt at helping me though. I learned a few things from you Joost :).