in reply to Modifying packages without violating use strict
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.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();
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 |