<div dir="ltr">Another thought: you say for <REASONS> you can't upgrade "it".  Which item does "it" refer to, the "<span style="font-family:arial,sans-serif;font-size:13px">CentOS 5.10" or the "perl 5.8.8"?</span><div>

<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Would it be possible to use <a href="http://perlbrew.pl/">perlbrew</a> to install a parallel, newer version of perl that, perhaps, you CAN install the </span><span style="font-family:arial,sans-serif;font-size:13px">XS version of Scalar::Util into?  You wouldn't be upgrading either the OS or the system perl: you'd be installing a parallel perl installation which has it's own library of modules.  It's what I do when I'm on a system and need a better perl than what's in /usr/bin/perl; that way, I don't have to worry about screwing up anything that depends on the ancient version of perl that shipped with the OS.</span></div>

<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Just a thought...</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>

</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">-packy</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 27, 2014 at 11:26 PM, Patrick Cronin <span dir="ltr"><<a href="mailto:oshihuna@gmail.com" target="_blank">oshihuna@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>I have the book Mastering Perl, and a few months ago I thought I was pretty good. Now I just learned that Mastering Perl is only half of what Perl is all about.</div>

<div><br></div><div>Thanks for the info and the link!</div><div><br></div><div><br>On Mar 27, 2014, at 10:26 PM, Benjamin Holzman <<a href="mailto:bholzman@gmail.com" target="_blank">bholzman@gmail.com</a>> wrote:<br>

<br></div><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>Don't think there is a pure perl way to do a dualvar. It's got nothing to do with typeglobs, dualvars work by abusing the IVX slot of a PVIV scalar. See <a href="http://cpansearch.perl.org/src/RURBAN/illguts-0.36/index.html#svpviv" target="_blank">http://cpansearch.perl.org/src/RURBAN/illguts-0.36/index.html#svpviv</a></div>


</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Thu, Mar 27, 2014 at 9:46 PM, Patrick Cronin <span dir="ltr"><<a href="mailto:oshihuna@gmail.com" target="_blank">oshihuna@gmail.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div style="word-wrap:break-word"><div>I manage a CentOS 5.10 server running perl 5.8.8. For <REASONS>, I can't upgrade it.</div>


<div><br></div><div>For some reason, I can't install the XS version of Scalar::Util, and so I'm stuck using the PP version. Net::OpenSSH relies on Scalar::Util's dualvar function (which is only available in the XS version of Scalar::Util) to create a single scalar holding both an integer and string value. When the scalar is used in a numeric context, the integer value comes out, and when the scalar is used in a string context, the string value comes out. I'm trying to write a quick and dirty PP version of dualvar so I can move on with my life.</div>


<div><br></div><div>I seem to remember seeing this being done, but no amount of googling is getting me there. I've looked up typeglobs and the *foo{THING} construct, but while THING can be SCALAR, it can't be NUMBER or STRING. Does anyone know the magic to make this happen?</div>


<div><br></div><div>I'm trying variations of the following:</div><div><br></div><div>my $int = 2;</div><div>my $string = "test";</div><div><br></div><div>my $typeglob = $int;</div><div>*typeglob{SCALAR} = ${ *string };</div>


<div><br></div><div>print ($typeglob + 2) . "\n";</div><div>print $typeglob . " YES!\n";</div><div><br></div><div>It just feels gross, and it's not working.</div><div><br></div><div>Does anyone have the magic?</div>


<div><br><hr style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">


<table style="font-family:Helvetica;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px"><tbody><tr><td style="vertical-align:top;width:70px"><img width="70" height="69" src="http://cronin.dyndns.org/avatar.jpg" align="left" hspace="9" alt="Patrick's Avatar"></td>


<td><span style="font-family:Calibri"><u></u><b><span style="color:rgb(31,73,125);font-size:12pt">Patrick Cronin</span></b><span> </span><u></u><br><span style="color:rgb(89,89,89);font-size:10pt"><u></u>Computer Lover<u></u><br>


<u></u>Mobile: <a href="tel:%2B1%20518%20336%205133" value="+15183365133" target="_blank">+1 518 336 5133</a><u></u><br><u></u>Email:<span> </span><a href="mailto:oshihuna@gmail.com" target="_blank">oshihuna@gmail.com</a><br>


Skype: patrickcronin12061<u></u><span> </span></span></span><span style="font-size:8pt;color:green"><br><br><span style="font-family:webdings">P</span><span> </span><span style="font-family:arial">Please consider the environment before printing this e-mail / attachments</span><span> </span> </span><span> </span></td>


</tr></tbody></table>
</div>
<br></div><br></div></div>_______________________________________________<br>
Albany-pm mailing list<br>
<a href="mailto:Albany-pm@pm.org" target="_blank">Albany-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/albany-pm" target="_blank">http://mail.pm.org/mailman/listinfo/albany-pm</a><br></blockquote></div><br></div>
</div></blockquote></div><br>_______________________________________________<br>
Albany-pm mailing list<br>
<a href="mailto:Albany-pm@pm.org">Albany-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/albany-pm" target="_blank">http://mail.pm.org/mailman/listinfo/albany-pm</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Packy Anderson<br><br>Email:  <a href="mailto:packy@dardan.com" target="_blank">packy@dardan.com</a><br>

GVoice: (646) 833-8832
</div>