Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   Saving a compiled source file with the "require"d files (http://www.velocityreviews.com/forums/t891954-saving-a-compiled-source-file-with-the-require-d-files.html)

Ray Muforosky 04-21-2005 09:27 PM

Saving a compiled source file with the "require"d files
 
Help.


If I have file1 that loads (require file2 and files), is it possible
save the content of file file after the load.


example:
file1
#!perl
$a =12;
require file2;
$b = $z;
require file3;
$c = $y;
print $a;


file2
$z = 200;
1;


file3
$y = "foo";
1;


So, is it possible to save file1 after loading file2 and file3
file1 becomes:
#!perl
$a =12;
$z = 200;
$b = $z;
$y = "foo";
$c = $y;
print $a;


Thanks
Ray


xhoster@gmail.com 04-21-2005 09:30 PM

Re: Saving a compiled source file with the "require"d files
 
"Ray Muforosky" <izombe@yahoo.com> wrote:
> Help.


Please pick one appropriate subject line, and then stick with it.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB

Ray Muforosky 04-21-2005 09:42 PM

Re: Saving a compiled source file with the "require"d files
 
My apologies, I thought the first subject was not proper.


Anno Siegel 04-22-2005 10:05 AM

Re: Saving a compiled source file with the "require"d files
 
Ray Muforosky <izombe@yahoo.com> wrote in comp.lang.perl.misc:
> Help.
>
>
> If I have file1 that loads (require file2 and files), is it possible
> save the content of file file after the load.
>
>
> example:
> file1
> #!perl
> $a =12;
> require file2;
> $b = $z;
> require file3;
> $c = $y;
> print $a;
>
>
> file2
> $z = 200;
> 1;
>
>
> file3
> $y = "foo";
> 1;
>
>
> So, is it possible to save file1 after loading file2 and file3
> file1 becomes:
> #!perl
> $a =12;
> $z = 200;
> $b = $z;
> $y = "foo";
> $c = $y;
> print $a;


You can use Perl to print the text above, and you can overwrite
file1 with it, but you'll have to write the code yourself. I would
not call that "saving file1 after loading", it's a completely
different file.

Anno


All times are GMT. The time now is 08:13 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.