Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-SSH2 CPAN distribution.

Report information
The Basics
Id:
22821
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
sisyphus [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Unimportant
Broken in:
0.09
Fixed in:
(no value)



Subject: Extending support to perl 5.6 seems to be not all that difficult
With the attached patch to the Net-SSH2-0.09 typemap, Net-SSH2-0.09 builds fine on perl 5.6. Of course, it's also necessary to replace each occurrence of "use 5.008;" (in the Makefile.pl and all of the *.pm files) with "use 5.006;". Cheers, Rob
Subject: diff.txt
--- typemap_old 2006-05-07 12:14:50.000000000 +1000 +++ typemap 2006-11-06 00:09:08.000000000 +1100 @@ -1,3 +1,9 @@ + +char * T_PV +unsigned char * T_PV +const char * T_PV +AV * T_AVREF + TYPEMAP SSH2 * O_SESSION SSH2_CHANNEL * O_CHANNEL @@ -8,6 +14,12 @@ SSH2_PUBLICKEY* O_PUBLICKEY OUTPUT +T_PV + sv_setpv((SV*)$arg, $var); + +T_AVREF + $arg = newRV((SV*)$var); + O_SESSION sv_setref_pv($arg, "Net::SSH2", (void *)$var); @@ -52,6 +64,15 @@ sv_setref_pv($arg, "Net::SSH2::PublicKey", (void *)$var); INPUT +T_PV + $var = ($type)SvPV_nolen($arg) + +T_AVREF + if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVAV) + $var = (AV*)SvRV($arg); + else + Perl_croak(aTHX_ \"$var is not an array reference\") + O_SESSION if(sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG)) $var = ($type)SvIV((SV*)SvRV($arg));
Thanks, will be in 0.10. I don't have perl 5.6 so I can't test it myself, so I'm taking your word for it :). Still fine with 5.8, anyway.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.