I think the only real problem that you might encounter is copying the actual formats about. The problem is that there's no way of directly copying them unlike the other data types e.g
format foo =
.
{
package mypkg;
*form_foo = *main::foo;
*form_ref = *form_foo{FORMAT};
}
use Devel::Peek;
Dump(*main::foo);
Dump(*mypkg::form_foo);
Dump(*mypkg::form_ref);
__output__
SV = PVGV(0x80f9c78) at 0x8100de8
...
FORM = 0x80fd4e4
SV = PVGV(0x80f9dc0) at 0x8100e24
...
FORM = 0x80fd4e4
SV = PVGV(0x8101820) at 0x8100e3c
...
FORM = 0x0
So you'll have to end up exporting entire globs into the given packages, which isn't ideal.
HTH
_________ broquaint
update: changed FORM to FORMAT
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|