Comments (3)
I found a simple workaround solution: In Template::_output (in Template.pm), change
my $bm = $options->{ binmode };
to
my $bm = $options->{ binmode } // $BINMODE;
Then in your main perl script set
$Template::BINMODE = ':raw';
Then you can process the template using
$tt->process($srcfile, {}, $tgtfile) || die $tt->error . "\n";
and get CR-LF line endings in both the main and redirected output.
from template2.
user worked around it, we can closed it
from template2.
I am puzzled by the closing of this ticket because the "user worked around it". Closing the ticket without resolving the bug means that the bug still exists in the product. My workaround requires a modification of the Template Toolkit code, so perhaps "workaround" wasn't the best way to describe it. I called it a workaround and not the solution because I am not sufficiently familiar with the Template Toolkit to judge if my proposed code change has undesirable side effects elsewhere in the Template Toolkit, or when the Toolkit with my code change is used on operating systems other than Windows or with versions of Perl other than the one I used.
I hope that you can reopen this ticket and review the code change that I proposed for the Template Toolkit to be able to resolve the problem.
from template2.
Related Issues (20)
- Type of error with STRICT documented as "var.undefined" but implemented as "var.undef" HOT 2
- Untainting machinery is noisy under Perl 5.35.2 HOT 3
- Load order can break TT HOT 1
- Lingering references to cgi.t in release 3.100 HOT 1
- line number in debug mode when using OUTLINE mode HOT 2
- Extracting META data HOT 4
- t/html.t is looking for the wrong module HOT 1
- Exiting a MACRO early
- Assert always throws
- Test::Template should be based on Test::Builder for compatibilty HOT 2
- Template-Toolkit-3.101: Warning: the following files are missing in your kit
- Template-Toolkit-3.101: t/filter.t seems to contain locale-dependent tests. HOT 1
- Speed up html_entity by optionally using HTML::Escape HOT 6
- Compiled templates have incorrect line numbers for IF statements
- Consider updating to Perl 5.10
- test errors in 5.39.1 due to change in import logic HOT 1
- HTTPS with invalid cert for template-toolkit.org
- Update first question in the FAQ
- Document the parsing rules for arithmetic expressions
- Silent parsing failure when passing expressions to a MACRO
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from template2.