[ic] Want to use new module/library in embedded Perl code

Timothy Cassidy 6tc1@qlink.queensu.ca
Mon, 12 Feb 2001 20:02:28 -0500 (EST)

I'm trying to use this JVM module/library that I have working for perl,
but I can't seem to "use JVM" within any embedded perl code I write.
Further I can't access this JVM module/library from within any subroutines
within my interchange.cfg file.

I tried digging up everything I could on user tags or interchange tags.

But the majority of information I found on perl code in the
interchange.cfg file was concerned with defining perl subroutines.

The best I was able to do was create a GlobalSub in the interchange.cfg

GlobalSub <<EOF
sub count_orders {
return "this is returned from count_orders subroutine.\n";

However, I wasn't able to call this subroutine from within any of my
embedded perl code:
[perl sub]
return count_orders();

So then I tried creating a regular subroutine in the interchange.cfg file:
Sub <<EOF
sub sort_cart_by_quantity {
my $out = 'This is a test!!!';
return $out;

But again I couldn't call it from my embedded perl code in my html pages:
return sort_cart_by_quantity();

Anyway, now I am a bit stumped.  The majority of reading I did on usertags
was in the icconfig.pdf and ictemplates.pdf.  You'll notice that neither
of my subroutines use the JVM module/library I was talking about.  This is
because I wanted to get a regular subroutine working before I tried use
JVM.  I'm not sure if this is what you intended when you said to put a
user tag in my interchange.cfg file.  If it isn't I apologize, but
information seems fairly scarce on the topic of usertags in the
interchange.cfg file.  This was all I could find:

7.42. UserTag *global*
This defines a UserTag which is global in nature, meaning not limited by
the Safe.pm module, and is is
available to all Interchange catalogs running on the server. Otherwise,
this is the same as a catalog UserTag.

Anyway, I am either lacking the documentation or I'm just not thinking
this through correctly.


PS I have the following manuals:

On Sat, 10 Feb 2001, Dan B wrote:

> At 03:34 PM 2/10/2001 -0500, you wrote:
> >Hi, I have downloaded and installed a new module for my perl compiler.
> >This module is referred to as JVM, it allows a programmer to access Java
> >code from within their perl code.
> >
> >The module installation has worked great and I have been able to write
> >Perl code that executes Java code.
> >
> >Unfortunately when I try to use this JVM library/module in embedded perl,
> >I get errors.  Is there a particular perl file I should include the
> >use Jvm;
> >line in so that my embedded perl code can access this library?
> If I'm correct, the embedded perl code is run through the Safe module,
> which would understandably restrict your usage of a JVM
> module.  (Otherwise, an exploit allowing user-entered data to be executed
> within Safe would be able execute arbitrary Java code -- even more
> dangerous than arbitrary perl executed in Safe).
>  From what I understand, a global UserTag isn't run through the Safe
> module.  Read up on UserTags and put one in interchange.cfg that uses your
> JVM.  That might work.
> Dan Browning, Cyclone Computer Systems, danb@cyclonecomputers.com
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users