[ic] Open and 'run' a page from within another page? -- even more info

Stefan Hornburg interchange-users@icdevgroup.org
Thu Nov 7 17:21:01 2002


On Thu, 7 Nov 2002 12:05:17 -0500
Mike Heins <mike@perusion.com> wrote:

> Quoting marc.brevoort (marc.brevoort@armazemdedados.com):
> > Thanks Kevin,
> > 
> > > You should find that it all works.  If it
> > > doesn't then perhaps there's something wrong with the contents of your
> > > file.
> > 
> > I overlooked the global log file, this file says 'Attempt to call perl from 
> > within Safe.' which explains why the [calc] tag is executed properly while 
> > the [perl] tag doesn't work. 
> > 
> > > > How can I run a page from within another page, and make it act
> > > > *in the same way* it would when running stand-alone?
> > 
> > If I open the page as regular HTML, interchange runs in normal mode and all 
> > is cool, but if it is included from another page, the include tag decides 
> > that it should run in Safe mode now, and interchange no longer accepts [perl] 
> > tags. This breaks both my code and the header template. 
> > 
> > If I use [calc] tags instead of [perl] tags, my code breaks as well (Safe: 
> > Undefined subroutine &Vend::Interpolate::some_sub_i_defined), and the header 
> > template will still be broken too. It's said that "Using AllowGlobal is never 
> > necessary", any clues how to solve this the 'right' way?
> 
> I assume you are not doing:
> 
> 	$Tag->include('somefile');
> 
> That would definitely be a no-no.

Interesting. And why would this work:

		$Tag->email_mime ({from => 'info@materialboerse.de',
    	              to => $email,
        	          subject => errmsg('Herzlich Willkommen bei materialboerse.de'),
					  btype => 'text/html',
					  type => ['application/pdf','application/excel'],
					  path => [$pdf,'html/xls/mb_tabelle.xls']},
	                $Tag->include('process/new_company'));

This is called from a catalog usertag and it works with 4.8.x.

Ciao
       Racke