in reply to Re: Imported symbol names
in thread Imported symbol names

Any possibility that i could do:
package CGI::MyChild; use base qw(CGI); use CGI qw(:form);
and import directly, so the programs using it dont have to add the qw(:form)

I am a bit over my head on this, havent played symbols games like this very much :)

Replies are listed 'Best First'.
Re^3: Imported symbol names
by dragonchild (Archbishop) on Jul 08, 2004 at 18:17 UTC
    You're confusing yourself. How are you going to allow your users to use this? Will they use the OO interface, the procedural interface, or will you allow them to use both? The easiest thing on you is to allow one or the other. The OO interface is easiest and the procedural isn't too difficult, once you see it done once. Doing them both is going to be more trouble than it's worth, IMHO.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

    I shouldn't have to say this, but any code, unless otherwise stated, is untested

      I think you're correct i was confusing myself. Im really only going for the OO interface, i just dont see the point of the function oriented interface, eventually someone will have symbol clashes
        If that's all you want, then it doesn't matter at all what to do with use CGI qw( :form );, cause no-one should ever use it. All they need to do is change the my $q = CGI->new; to my $q = CGI::shemp->new; and everything will "Just Work"™.

        ------
        We are the carpenters and bricklayers of the Information Age.

        Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

        I shouldn't have to say this, but any code, unless otherwise stated, is untested