RE: How to use the existing perl module in perlaspx?
by Tom Humphrey other posts by this author
Jun 27 2005 12:32AM messages near this date
view in the new Beta List Site
How to use the existing perl module in perlaspx?
|
Regular expression FAILs when exising the "[]"
FRAMEWORK What makes you think PERL.NET actually works?
Try running it with Visual Studio 2005 and watch everything puke all over. I
wouldn't be surprised if that is your problem.
Just buy komodo and end your misery.
----Original Message Follows----
From: "����" <cwh2k@[...].com>
To: "Perl.NET" <Perl.NET@[...].com>
Subject: How to use the existing perl module in perlaspx?
Date: Mon, 27 Jun 2005 11:12:50 +0800
hi,everyone!
I got a problem to use the existing perl module in perlaspx. For
example, I want to wrap the existing "Encode" module to transfer between the
Unicode and the GB text.
Firstly, I add a new encode.pm file to wrap the existing "Encode"
module:
package PerlNLPServices::Encode;
use strict;
=for interface
[interface: pure]
static str myfromto(str src,str encode1,str encode2);
=cut
require Encode;
sub myfromto
{
my($src,$encode1,$encode2) = @_;
#return Encode::from_to(src,encode1,encode2); # to test the
process, I comment it!
return $src;
}
Secondly, I use the above function in my webservice main file:
....
package PerlNLPServices::MyPos;
use PerlNET qw(AUTOCALL);
use namespace "PerlNLPServices";
=for interface
[WebMethod]
string POS(string value);
=cut
sub POS {
my($this,$value) = @_; #
$value = myfromto($value,"utf8","gb2312");
return $value;
}
....
Lastly, when I test it, it turns to a mistake.
Is my way wrong? and how to solve it? Thank you.
yours,
cwh
������������cwh2k@[...].com
����������������2005-06-27
_______________________________________________
Perl.NET mailing list
Perl.NET@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl.NET mailing list
Perl.NET@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
1
Tom Humphrey
|