in reply to Modifying packages without violating use strict

If I understand your question correctly you want this
package Foo; sub inscope { print "in Foo's scope\n" } 1; package main; use strict; sub Foo::outofscope { print "in main's scope\n" } Foo::inscope(); Foo::outofscope();
Although I'm not sure if it breaks when using Safe it works under use strict and is the only 'safe' way I know of adding functions to packages outside of their scope without having to do funky symbol magic.
HTH

broquaint

Replies are listed 'Best First'.
Re: Re: Modifying packages without violating use strict
by jackdied (Monk) on Feb 07, 2002 at 01:48 UTC
    I hate missing the obvious.
    This will compile without complaints in a Safe sandbox, so consider my question expanded to "Any idea how to do want I want?"