Return-Path: X-Original-To: apmail-perl-embperl-archive@www.apache.org Delivered-To: apmail-perl-embperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85BC8DF94 for ; Wed, 26 Sep 2012 10:18:12 +0000 (UTC) Received: (qmail 7539 invoked by uid 500); 26 Sep 2012 10:18:12 -0000 Delivered-To: apmail-perl-embperl-archive@perl.apache.org Received: (qmail 6935 invoked by uid 500); 26 Sep 2012 10:18:05 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list embperl@perl.apache.org Received: (qmail 6905 invoked by uid 99); 26 Sep 2012 10:18:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2012 10:18:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of perlover@gmail.com designates 209.85.223.177 as permitted sender) Received: from [209.85.223.177] (HELO mail-ie0-f177.google.com) (209.85.223.177) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2012 10:17:56 +0000 Received: by ieje14 with SMTP id e14so1436378iej.22 for ; Wed, 26 Sep 2012 03:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=eqgYzl+WlS/0RkdLbWH24BXPlXVR/w/n167aTJOPTNY=; b=JWpwNQuNsSWd8rV4xv5BZ6R1XKnrJLuxkd8Aeo9yWGxqyxDJNiORSqNRyH2baCi+Cd ydgPGmotEYi+9Cdx1LLQ+KUsE0NlCcuZZVeoJU4FQrdddShLJgzZO/ySyUcRyK/hqF6Q qakiM4F6otdw7ZMELrpJSphEnru+Ll0Fux2vSN4jv5UTiUEMFEFaAAmvEuoRZlqUU+tZ Y1SYFXjMyvWllVh9RlU1/LX9mIOSyLzgDN/iXj8n2VfY3EWg/thpfAym3l4WBeW8J5F1 Lp2WD4p6CZlJ38ZQjoQUl5BGKarLK/cwKv4psE/SMlRJAahLrlP/89VElxcoylTJ0Qno 6wVA== MIME-Version: 1.0 Received: by 10.50.0.203 with SMTP id 11mr10667696igg.69.1348654655226; Wed, 26 Sep 2012 03:17:35 -0700 (PDT) Received: by 10.64.59.106 with HTTP; Wed, 26 Sep 2012 03:17:35 -0700 (PDT) Date: Wed, 26 Sep 2012 12:17:35 +0200 Message-ID: Subject: Input files in Execute and PerlIO layers for theirs + object_base option doesn't work From: Perlover To: embperl@perl.apache.org Content-Type: text/plain; charset=ISO-8859-1 Dear Gerald, I have some problems with Embperl 2.4.0 (perl v.5.14.2) First, i use Embperl in my own environment (no mod_perl, apache, fcgi and etc). Only process under Starman server I want to use Embperl as: my $out; Embperl::Object::Execute({ inputfile => "/foo/dir/test.epl", object_base => 'base.epl', object_stopdir => "/foo/dir", output => \$out }) I have some problems: 1) (BUG?) Embperl::Object doesn't see base.epl file. I have /foo/dir/base.epl in directory! I see in Starman's logs error as: [1738]ERR: 404: : Not found '_base.epl', searched: If i rename base.epl to _base.epl them my template works BUT: 2) (HELP) Other problem. I use everywhere UTF-8 encoding. My scripts have "use utf8" and in UTF-8 encoding, files are in UTF-8 But i see that $out in my example doesn't have utf8 flag. I think it's because Embperl open file (inputfile) without ":utf8" layer. And it reads this file as plain binary file. If i will use "params" with utf8 perl variables i think i will have a hell. You write in documentation that Embperl works with UTF-8. Yes, may be it keeps utf8 flag in variables, in outputs but i think Embperl doesn't work correctly with input files. Am i right? As workaround i see simple option: inputfile_binmode in Execute function for example. If Embperl will have this option i will happy as i think! For example: if i use this option then Embperl opens files under Execute and use PerlIO layer with this layer. Certainly, i can read files myself and use 'input' option but i want to use benefits of caching of Embperl. If i use files through Embperl as i think the Embperl controls modification times of files and caches theirs. Perlover --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org For additional commands, e-mail: embperl-help@perl.apache.org