perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PILCH Hartmut <...@a2e.de>
Subject printing to OUT from within a package /was: erratic effect of input key in Execute
Date Tue, 28 Mar 2006 11:50:52 GMT
> > 	[- print WEB "<h3>blablabla</h3>" -]
> 
> You need to print to OUT inside your Embperl code

That works too, except when I do this in a external package, e.g.


foo/bar.pm

	package Foo::Bar;

	[...]

  	sub say1 {
	  print OUT "DEBUG1: ";
	  printf OUT @_;
 	  print OUT "\n";			
	} 

	__END__


saytest.htm

	[- use Foo::Bar qw(say1);
	   sub say2 {
	        print OUT "DEBUG2: ";
		printf OUT @_;
		print OUT "\n";
	   }
          -]
  	 
        <h3>[- say1 "foo" -]</h3>	
        <h3>[- say2 "bar" -]</h3>


This will print only 

	<h3></h3>
        <h3>DEBUG2: bar</h3>

				
Is the file descriptor OUT not accessible from the package ?

--
Hartmut Pilch		http://a2e.de/phm/adv/embperl/

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message