in reply to Re: Spanning Modules Across Multiple Files
in thread Spanning Modules Across Multiple Files

Good ideas. I actually started out with Zephir::General, etcetera but later digresed to the single package when I noticed that all my scripts used every submodule. And yes you are right about the eventual OO implementation of the module, but I probably won't be doing it quite yet.

-caedes

  • Comment on Re: Re: Spanning Modules Across Multiple Files

Replies are listed 'Best First'.
Re: Re: Re: Spanning Modules Across Multiple Files
by IlyaM (Parson) on Jul 05, 2002 at 13:13 UTC
    You can put some code into Zephir/General.pm, load it with use Zephir::General but still have it in Zephir package as long as Zephir/General.pm starts with package Zephir. Module SomeName isn't really required to contain package SomeName. It is common convention but it is not strict rule you cannot break.

    --
    Ilya Martynov (http://martynov.org/)

Re: Re: Re: Spanning Modules Across Multiple Files
by fruiture (Curate) on Jul 05, 2002 at 13:25 UTC
    all my scripts used every submodule

    That's why I think you should let Zephir.pm organize loading and exporting of libraries. It could export an AUTOLOAD routine and fetch other stuff really in-time. Your scripts will use this interface without noticing what's going on behind the scenes, they just call subroutines.