Archive::Zip not Ingesting Directories
This is a multi-part message in MIME format.
--===============0184376066==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C76712.E208BE20"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C76712.E208BE20
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
Dear Gurus-
I have a feeling that this will turn out to be user error
I have the following code snippet and it refuses to zip up the
directories. The flat file has been moved several times as to where I
ingest that. It is the ONLY thing in the zip each time.
It is also the ONLY file that is a relative path and therefore the only
one with an apriori knowledge of where it will be.
[code snippet begin]
# create archive using SMInf and configs/logs
# this builds to what should be default logs/configs directories
my $zip =3D Archive::Zip->new();
&rep("silent debug locations:\nwebloc: $webloc\npolloc: $polloc",0);
if($webloc){
my $config=3D"$webloc/config/";
my $logd=3D"$webloc/log/";
my $dir_member =3D $zip->addDirectory( $config );
$dir_member =3D $zip->addDirectory( $logd );
&rep("silent debug specific-wa:\nconfig: $config\nlogd: $logd",0);
}
if($polloc){
my $config=3D"$polloc/config/"; $config =3D~ s/\\/\//g;
my $logd=3D"$polloc/log/"; $logd =3D~ s/\\/\//g;
my$dir_member =3D $zip->addDirectory( $config );
$dir_member =3D $zip->addDirectory( "$logd" );
&rep("silent debug specific-ps:\nconfig: $config\nlogd: $logd",0);
}
my $file_member =3D $zip->addFile( 'SMInf.txt' );
unless ( $zip->writeToFileNamed('SMProfile.zip') =3D=3D AZ_OK ) {
die "write error-zip: $^O";
}
[code snippet end]
Josh Perlmutter
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and contain information that may be privileged
and confidential. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient of
this e-mail, please delete this e-mail and any files transmitted with it
and notify the sender immediately.
------_=_NextPart_001_01C76712.E208BE20
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:#606420;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3D"#606420">
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Dear Gurus-<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have a feeling that this will turn out to be user =
error<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have the following code snippet and it refuses to =
zip up
the directories. The flat file has been moved several times as to where =
I ingest
that. It is the ONLY thing in the zip each =
time.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>It is also the ONLY file that is a relative path and
therefore the only one with an apriori knowledge of where it will =
be.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>[code snippet begin]<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'># create archive using SMInf and =
configs/logs<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'># this builds to what should be default logs/configs
directories<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>my $zip =3D =
Archive::Zip->new();<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&rep("silent debug locations:\nwebloc:
$webloc\npolloc: $polloc",0);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>if($webloc){<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my =
$config=3D"$webloc/config/";<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my =
$logd=3D"$webloc/log/";<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my $dir_member =3D $zip->addDirectory( =
$config );<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> $dir_member =3D $zip->addDirectory( $logd =
);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> &rep("silent debug =
specific-wa:\nconfig:
$config\nlogd: $logd",0);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>}<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>if($polloc){<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my $config=3D"$polloc/config/"; =
$config =3D~
s/\\/\//g;<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my $logd=3D"$polloc/log/"; $logd =
=3D~
s/\\/\//g;<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my$dir_member =3D $zip->addDirectory( =
$config );<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> $dir_member =3D $zip->addDirectory(
"$logd" );<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> &rep("silent debug =
specific-ps:\nconfig:
$config\nlogd: $logd",0);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>}<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>my $file_member =3D $zip->addFile( 'SMInf.txt' =
);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>unless ( $zip->writeToFileNamed('SMProfile.zip') =
=3D=3D AZ_OK
) {<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> die "write error-zip: =
$^O";<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>}<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>[code snippet end]<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Josh Perlmutter</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D1 face=3DVerdana><span =
style=3D'font-size:8.0pt;
font-family:Verdana'>This e-mail and any files transmitted with it are =
for the
sole use of the intended recipient(s) and contain information that may =
be
privileged and confidential. Any unauthorized review, use, =
disclosure or
distribution is prohibited. If you are not the intended recipient =
of this
e-mail, please delete this e-mail and any files =
transmitted with it
and notify the sender immediately.</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>
------_=_NextPart_001_01C76712.E208BE20--
--===============0184376066==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0184376066==--
RE: Archive::Zip not Ingesting Directories
This is a multi-part message in MIME format.
--============== 65719636==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C76715.3D5B9898"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C76715.3D5B9898
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I use addTree to do this and it works great, following code is an
example:
my $zip =3D Archive::Zip->new();
my $releaseRoot =3D "C:\\temp\\release";
my $rslt =3D $zip->addTree($releaseRoot);
$rslt =3D $zip->writeToFileNamed($zipFile);
if (!$rslt) {
print "SUCCESS\n";
} else {
AbortWithError("Failed to create zip file for release");
}
________________________________
From: activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] On Behalf Of
Perlmutter, Joshua B
Sent: Thursday, March 15, 2007 8:02 AM
To: activeperl [at] listserv.ActiveState.com
Subject: Archive::Zip not Ingesting Directories
Dear Gurus-
I have a feeling that this will turn out to be user error
I have the following code snippet and it refuses to zip up the
directories. The flat file has been moved several times as to where I
ingest that. It is the ONLY thing in the zip each time.
It is also the ONLY file that is a relative path and therefore the only
one with an apriori knowledge of where it will be.
[code snippet begin]
# create archive using SMInf and configs/logs
# this builds to what should be default logs/configs directories
my $zip =3D Archive::Zip->new();
&rep("silent debug locations:\nwebloc: $webloc\npolloc: $polloc",0);
if($webloc){
my $config=3D"$webloc/config/";
my $logd=3D"$webloc/log/";
my $dir_member =3D $zip->addDirectory( $config );
$dir_member =3D $zip->addDirectory( $logd );
&rep("silent debug specific-wa:\nconfig: $config\nlogd: $logd",0);
}
if($polloc){
my $config=3D"$polloc/config/"; $config =3D~ s/\\/\//g;
my $logd=3D"$polloc/log/"; $logd =3D~ s/\\/\//g;
my$dir_member =3D $zip->addDirectory( $config );
$dir_member =3D $zip->addDirectory( "$logd" );
&rep("silent debug specific-ps:\nconfig: $config\nlogd: $logd",0);
}
my $file_member =3D $zip->addFile( 'SMInf.txt' );
unless ( $zip->writeToFileNamed('SMProfile.zip') =3D=3D AZ_OK ) {
die "write error-zip: $^O";
}
[code snippet end]
Josh Perlmutter
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and contain information that may be privileged
and confidential. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient of
this e-mail, please delete this e-mail and any files transmitted with it
and notify the sender immediately.
------_=_NextPart_001_01C76715.3D5B9898
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
[at] font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:#606420;
text-decoration:underline;}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
span.EmailStyle18
{font-family:Arial;
color:navy;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3D"#606420">
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>I use addTree to do this and it =
works
great, following code is an example:</span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> =
</span></font></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
my
$zip =3D Archive::Zip->new();</span></font></b></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
my
$releaseRoot =3D “C:\\temp\\release”;</span></font></b></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
my
$rslt =3D $zip->addTree($releaseRoot);</span></font></b></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
$rslt =3D $zip->writeToFileNamed($zipFile);</span></font></b></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
if
(!$rslt) {</span></font></b></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
print "SUCCESS\n";</span></font></b></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
}
else {</span></font></b></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
AbortWithError("Failed to create zip file for =
release");</span></font></b></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
}</span></font></b></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<div>
<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>
<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>
</span></font></div>
<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font =
size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'>
activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] <b><span =
style=3D'font-weight:
bold'>On Behalf Of </span></b>Perlmutter, Joshua B<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, March 15, =
2007
8:02 AM<br>
<b><span style=3D'font-weight:bold'>To:</span></b>
activeperl [at] listserv.ActiveState.com<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> Archive::Zip not
Ingesting Directories</span></font></p>
</div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Dear Gurus-</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have a feeling that this will turn out to be user =
error</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have the following code snippet and it refuses to =
zip up
the directories. The flat file has been moved several times as to where =
I
ingest that. It is the ONLY thing in the zip each =
time.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>It is also the ONLY file that is a relative path and =
therefore
the only one with an apriori knowledge of where it will =
be.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>[code snippet begin]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'># create archive using SMInf and =
configs/logs</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'># this builds to what should be default logs/configs
directories</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>my $zip =3D Archive::Zip->new();</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&rep("silent debug locations:\nwebloc:
$webloc\npolloc: $polloc",0);</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>if($webloc){</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my =
$config=3D"$webloc/config/";</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my =
$logd=3D"$webloc/log/";</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my $dir_member =3D $zip->addDirectory( =
$config );</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> $dir_member =3D $zip->addDirectory( $logd =
);</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> &rep("silent debug =
specific-wa:\nconfig:
$config\nlogd: $logd",0);</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>}</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>if($polloc){</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my $config=3D"$polloc/config/"; =
$config =3D~
s/\\/\//g;</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my $logd=3D"$polloc/log/"; $logd =
=3D~
s/\\/\//g;</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my$dir_member =3D $zip->addDirectory( =
$config );</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> $dir_member =3D $zip->addDirectory(
"$logd" );</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> &rep("silent debug =
specific-ps:\nconfig:
$config\nlogd: $logd",0);</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>}</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>my $file_member =3D $zip->addFile( 'SMInf.txt' =
);</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>unless ( $zip->writeToFileNamed('SMProfile.zip') =
=3D=3D AZ_OK
) {</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> die "write error-zip: =
$^O";</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>}</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>[code snippet end]</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Josh Perlmutter</span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> </span></font></p>
<p class=3DMsoNormal><font size=3D1 face=3DVerdana><span =
style=3D'font-size:8.0pt;
font-family:Verdana'>This e-mail and any files transmitted with it are =
for the
sole use of the intended recipient(s) and contain information that may =
be
privileged and confidential. Any unauthorized review, use, =
disclosure or
distribution is prohibited. If you are not the intended recipient =
of this
e-mail, please delete this e-mail and any files =
transmitted with it
and notify the sender immediately.</span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> </span></font></p>
</div>
</body>
</html>
------_=_NextPart_001_01C76715.3D5B9898--
--============== 65719636==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--============== 65719636==--
RE: Archive::Zip not Ingesting Directories
=
From: activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] On Behalf Of
Perlmutter, Joshua B
Sent: 15 March 2007 15:02
To: activeperl [at] listserv.ActiveState.com
Subject: Archive::Zip not Ingesting Directories
> Dear Gurus-
> =
> I have a feeling that this will turn out to be user error
Commonly referred to as a problem between keyboard and chair. I think
most people experience those kinds of errors. I know I do.
> =
> I have the following code snippet and it refuses to zip up the
directories. The flat file has been moved =
> several times as to where I ingest that. It is the ONLY thing in the
zip each time.
> =
> It is also the ONLY file that is a relative path and therefore the
only one with an apriori knowledge of where > it will be.
> =
> [code snippet begin]
> =
> # create archive using SMInf and configs/logs
> # this builds to what should be default logs/configs directories
> my $zip =3D Archive::Zip->new();
> &rep("silent debug locations:\nwebloc: $webloc\npolloc: $polloc",0);
It may have been mentioned before, but you shouldn't call subs with the
'&' prefix, unless you know what it does and you actually need it, which
should be pretty rare.
> if($webloc){
> my $config=3D"$webloc/config/";
> my $logd=3D"$webloc/log/";
> my $dir_member =3D $zip->addDirectory( $config );
> $dir_member =3D $zip->addDirectory( $logd );
> &rep("silent debug specific-wa:\nconfig: $config\nlogd: $logd",0);
> }
> if($polloc){
> my $config=3D"$polloc/config/"; $config =3D~ s/\\/\//g;
> my $logd=3D"$polloc/log/"; $logd =3D~ s/\\/\//g;
> my$dir_member =3D $zip->addDirectory( $config );
> $dir_member =3D $zip->addDirectory( "$logd" );
> &rep("silent debug specific-ps:\nconfig: $config\nlogd: $logd",0);
> }
> my $file_member =3D $zip->addFile( 'SMInf.txt' );
> =
> unless ( $zip->writeToFileNamed('SMProfile.zip') =3D=3D AZ_OK ) {
> die "write error-zip: $^O";
> }
> [code snippet end]
Do $webloc and $polloc actually evaluate to a true value? You don't say.
Do the directories actually exist? You don't say, and you don't
explicitly check.
Perhaps you should also check the result of the addDirectory and addFile
calls.
I don't understand the sentence "The flat file has been moved several
times as to where I ingest that." means, or how it is relevant.
HTH
-- =
Brian Raven =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Atos Euronext Market Solutions Disclaimer
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
The information contained in this e-mail is confidential and solely for the=
intended addressee(s). Unauthorised reproduction, disclosure, modification=
, and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediat=
ely and delete it from your system. The views expressed in this message do =
not necessarily reflect those of Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited - Registered in England & Wales with=
registration no. 3962327. Registered office address at 25 Bank Street Lon=
don E14 5NQ United Kingdom. =
Atos Euronext Market Solutions SAS - Registered in France with registration=
no. 425 100 294. Registered office address at 6/8 Boulevard Haussmann 750=
09 Paris France.
L'information contenue dans cet e-mail est confidentielle et uniquement des=
tinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. Tou=
te copie, publication ou diffusion de cet email est interdite. Si cet e-mai=
l vous parvient par erreur, nous vous prions de bien vouloir prevenir l'exp=
editeur immediatement et d'effacer le e-mail et annexes jointes de votre sy=
steme. Le contenu de ce message electronique ne represente pas necessaireme=
nt la position ou le point de vue d'Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited Soci=E9t=E9 de droit anglais, enregi=
str=E9e au Royaume Uni sous le num=E9ro 3962327, dont le si=E8ge social se =
situe 25 Bank Street E14 5NQ Londres Royaume Uni.
Atos Euronext Market Solutions SAS, soci=E9t=E9 par actions simplifi=E9e, e=
nregistr=E9 au registre dui commerce et des soci=E9t=E9s sous le num=E9ro 4=
25 100 294 RCS Paris et dont le si=E8ge social se situe 6/8 Boulevard Hauss=
mann 75009 Paris France.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Archive::Zip not Ingesting Directories
Brian-
>Do $webloc and $polloc actually evaluate to a true value? You don't
say.
Yes, I initially set them to 0 and then change them if a location is
found, to the location (I believe that should make them true since they
are not 0)
>Do the directories actually exist? You don't say, and you don't
>explicitly check.
>Perhaps you should also check the result of the addDirectory and
addFile
>calls.
I'm new to Archive::Zip (this is my first time using it) I'll go add
those check now and see if that is working.
>I don't understand the sentence "The flat file has been moved several
>times as to where I ingest that." means, or how it is relevant.
The file is a flat text file that is created by the program and made in
the same directory. Where I had it added in relation to the directories
was originally first, then in the center, trying to see if that would
make a difference.
Thank you for the fast response.
-Josh
HTH
--
Brian Raven
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Archive::Zip not Ingesting Directories
This is a multi-part message in MIME format.
--===============1402237918==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C7671C.5C985B3D"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C7671C.5C985B3D
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
Thank you Frederick, that worked like a charm.
-Josh
________________________________
From: Washburn, Frederick [mailto:fwashbur [at] qualcomm.com]
Sent: Thursday, March 15, 2007 11:19 AM
To: Perlmutter, Joshua B; activeperl [at] listserv.ActiveState.com
Subject: RE: Archive::Zip not Ingesting Directories
I use addTree to do this and it works great, following code is an
example:
my $zip =3D Archive::Zip->new();
my $releaseRoot =3D "C:\\temp\\release";
my $rslt =3D $zip->addTree($releaseRoot);
$rslt =3D $zip->writeToFileNamed($zipFile);
if (!$rslt) {
print "SUCCESS\n";
} else {
AbortWithError("Failed to create zip file for release");
}
________________________________
From: activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] On Behalf Of
Perlmutter, Joshua B
Sent: Thursday, March 15, 2007 8:02 AM
To: activeperl [at] listserv.ActiveState.com
Subject: Archive::Zip not Ingesting Directories
Dear Gurus-
I have a feeling that this will turn out to be user error
I have the following code snippet and it refuses to zip up the
directories. The flat file has been moved several times as to where I
ingest that. It is the ONLY thing in the zip each time.
It is also the ONLY file that is a relative path and therefore the only
one with an apriori knowledge of where it will be.
[code snippet begin]
# create archive using SMInf and configs/logs
# this builds to what should be default logs/configs directories
my $zip =3D Archive::Zip->new();
&rep("silent debug locations:\nwebloc: $webloc\npolloc: $polloc",0);
if($webloc){
my $config=3D"$webloc/config/";
my $logd=3D"$webloc/log/";
my $dir_member =3D $zip->addDirectory( $config );
$dir_member =3D $zip->addDirectory( $logd );
&rep("silent debug specific-wa:\nconfig: $config\nlogd: $logd",0);
}
if($polloc){
my $config=3D"$polloc/config/"; $config =3D~ s/\\/\//g;
my $logd=3D"$polloc/log/"; $logd =3D~ s/\\/\//g;
my$dir_member =3D $zip->addDirectory( $config );
$dir_member =3D $zip->addDirectory( "$logd" );
&rep("silent debug specific-ps:\nconfig: $config\nlogd: $logd",0);
}
my $file_member =3D $zip->addFile( 'SMInf.txt' );
unless ( $zip->writeToFileNamed('SMProfile.zip') =3D=3D AZ_OK ) {
die "write error-zip: $^O";
}
[code snippet end]
Josh Perlmutter
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and contain information that may be privileged
and confidential. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient of
this e-mail, please delete this e-mail and any files transmitted with it
and notify the sender immediately.
------_=_NextPart_001_01C7671C.5C985B3D
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
..shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags" =
name=3D"City"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
[at] font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:#606420;
text-decoration:underline;}
span.emailstyle17
{font-family:Arial;
color:windowtext;}
span.emailstyle18
{font-family:Arial;
color:navy;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3D"#606420">
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Thank you <st1:City =
w:st=3D"on"><st1:place
w:st=3D"on">Frederick</st1:place></st1:City>, that worked like a =
charm.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>-Josh<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>
<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>
</span></font></div>
<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font =
size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'> =
Washburn,
Frederick [mailto:fwashbur [at] qualcomm.com] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, March 15, =
2007
11:19 AM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> Perlmutter, Joshua B;
activeperl [at] listserv.ActiveState.com<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> RE: Archive::Zip =
not
Ingesting Directories</span></font><o:p></o:p></p>
</div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>I use addTree to do this and it =
works
great, following code is an example:</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> =
</span></font><o:p></o:p></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
my $zip =3D Archive::Zip->new();</span></font></b><o:p></o:p></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
my $releaseRoot =3D =
“C:\\temp\\release”;</span></font></b><o:p></o:p></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
my $rslt =3D =
$zip->addTree($releaseRoot);</span></font></b><o:p></o:p></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
$rslt =3D =
$zip->writeToFileNamed($zipFile);</span></font></b><o:p></o:p></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
if (!$rslt) {</span></font></b><o:p></o:p></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
print "SUCCESS\n";</span></font></b><o:p></o:p></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
} else {</span></font></b><o:p></o:p></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
AbortWithError("Failed to create zip file for =
release");</span></font></b><o:p></o:p></p>
<p class=3DMsoNormal><b><font size=3D2 color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy;font- weight:bold'>=
}</span></font></b><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></p>
<div>
<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>
<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>
</span></font></div>
<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font =
size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'>
activeperl-bounces [at] listserv.ActiveState.com
[mailto:activeperl-bounces [at] listserv.ActiveState.com] <b><span =
style=3D'font-weight:
bold'>On Behalf Of </span></b>Perlmutter, Joshua B<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, March 15, =
2007
8:02 AM<br>
<b><span style=3D'font-weight:bold'>To:</span></b>
activeperl [at] listserv.ActiveState.com<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> Archive::Zip not =
Ingesting
Directories</span></font><o:p></o:p></p>
</div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Dear Gurus-</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have a feeling that this will turn out to be user =
error</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have the following code snippet and it refuses to =
zip up
the directories. The flat file has been moved several times as to where =
I
ingest that. It is the ONLY thing in the zip each =
time.</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>It is also the ONLY file that is a relative path and
therefore the only one with an apriori knowledge of where it will =
be.</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>[code snippet begin]</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'># create archive using SMInf and =
configs/logs</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'># this builds to what should be default logs/configs
directories</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>my $zip =3D =
Archive::Zip->new();</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&rep("silent debug locations:\nwebloc:
$webloc\npolloc: $polloc",0);</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>if($webloc){</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my =
$config=3D"$webloc/config/";</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my =
$logd=3D"$webloc/log/";</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my $dir_member =3D $zip->addDirectory( =
$config );</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> $dir_member =3D $zip->addDirectory( $logd =
);</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> &rep("silent debug =
specific-wa:\nconfig:
$config\nlogd: $logd",0);</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>}</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>if($polloc){</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my $config=3D"$polloc/config/"; =
$config =3D~
s/\\/\//g;</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my $logd=3D"$polloc/log/"; $logd =
=3D~
s/\\/\//g;</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> my$dir_member =3D $zip->addDirectory( =
$config );</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> $dir_member =3D $zip->addDirectory(
"$logd" );</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> &rep("silent debug =
specific-ps:\nconfig:
$config\nlogd: $logd",0);</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>}</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>my $file_member =3D $zip->addFile( 'SMInf.txt' =
);</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>unless ( $zip->writeToFileNamed('SMProfile.zip') =
=3D=3D AZ_OK
) {</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> die "write error-zip: =
$^O";</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>}</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>[code snippet end]</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Josh Perlmutter</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> <o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D1 face=3DVerdana><span =
style=3D'font-size:8.0pt;
font-family:Verdana'>This e-mail and any files transmitted with it are =
for the
sole use of the intended recipient(s) and contain information that may =
be
privileged and confidential. Any unauthorized review, use, =
disclosure or
distribution is prohibited. If you are not the intended recipient =
of this
e-mail, please delete this e-mail and any files =
transmitted with it
and notify the sender immediately.</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
</body>
</html>
------_=_NextPart_001_01C7671C.5C985B3D--
--===============1402237918==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1402237918==--