Comments (4)
This is fixed in 0.024
from app-modulebuildtiny.
Isolated this down to a double-encode in $dist->get_file
, so it is not completely without setting encoding as initially claimed:
DB<22> x $filename
0 'META.json'
DB<23> x $dist->{files}{$filename}
0 "{\cJ \"abstract\" : \"Fast & minimal low-level HTTP client\",\cJ \"author\" : [\cJ \"Kang-min Liu <gugod\@gugod.org>\",\cJ \"Ævar Arnfjörð Bjarmason <avar\@cpan.org>\",\cJ \"Borislav Nikolov <jack\@sofialondonmoskva.com>\",\cJ \"Damian Gryski <damian\@gryski.com>\"\cJ ],\cJ \"dynamic_config\" : 0,\cJ \"generated_by\" : \"App::ModuleBuildTiny version 0.023\",\cJ \"license\" : [\cJ \"mit\"\cJ ],\cJ \"meta-spec\" : {\cJ \"url\" : \"http://search.cpan.org/perldoc?CPAN::Meta::Spec\",\cJ \"version\" : 2\cJ },\cJ \"name\" : \"Hijk\",\cJ \"prereqs\" : {\cJ \"configure\" : {\cJ \"requires\" : {\cJ \"Module::Build::Tiny\" : \"0\"\cJ }\cJ },\cJ \"develop\" : {\cJ \"requires\" : {\cJ \"App::ModuleBuildTiny\" : \"0.023\"\cJ }\cJ },\cJ \"runtime\" : {\cJ \"requires\" : {\cJ \"Time::HiRes\" : \"0\"\cJ }\cJ },\cJ \"test\" : {\cJ \"requires\" : {\cJ \"HTTP::Server::Simple::PSGI\" : \"0\",\cJ \"Net::Ping\" : \"2.41\",\cJ \"Plack\" : \"0\",\cJ \"Test::Exception\" : \"0\",\cJ \"Test::More\" : \"0\"\cJ }\cJ }\cJ },\cJ \"provides\" : {\cJ \"Hijk\" : {\cJ \"file\" : \"lib/Hijk.pm\",\cJ \"version\" : \"0.27\"\cJ }\cJ },\cJ \"release_status\" : \"stable\",\cJ \"resources\" : {\cJ \"repository\" : {\cJ \"type\" : \"git\",\cJ \"url\" : \"https://github.com/gugod/Hijk.git\",\cJ \"web\" : \"https://github.com/gugod/Hijk\"\cJ }\cJ },\cJ \"version\" : \"0.27\",\cJ \"x_serialization_backend\" : \"JSON::PP version 2.97001\",\cJ \"x_static_install\" : \"1\"\cJ}\cJ"
DB<24> x $dist->get_file($filename)
0 "{\cJ \"abstract\" : \"Fast & minimal low-level HTTP client\",\cJ \"author\" : [\cJ \"Kang-min Liu <gugod\@gugod.org>\",\cJ \"�var Arnfjörð Bjarmason <avar\@cpan.org>\",\cJ \"Borislav Nikolov <jack\@sofialondonmoskva.com>\",\cJ \"Damian Gryski <damian\@gryski.com>\"\cJ ],\cJ \"dynamic_config\" : 0,\cJ \"generated_by\" : \"App::ModuleBuildTiny version 0.023\",\cJ \"license\" : [\cJ \"mit\"\cJ ],\cJ \"meta-spec\" : {\cJ \"url\" : \"http://search.cpan.org/perldoc?CPAN::Meta::Spec\",\cJ \"version\" : 2\cJ },\cJ \"name\" : \"Hijk\",\cJ \"prereqs\" : {\cJ \"configure\" : {\cJ \"requires\" : {\cJ \"Module::Build::Tiny\" : \"0\"\cJ }\cJ },\cJ \"develop\" : {\cJ \"requires\" : {\cJ \"App::ModuleBuildTiny\" : \"0.023\"\cJ }\cJ },\cJ \"runtime\" : {\cJ \"requires\" : {\cJ \"Time::HiRes\" : \"0\"\cJ }\cJ },\cJ \"test\" : {\cJ \"requires\" : {\cJ \"HTTP::Server::Simple::PSGI\" : \"0\",\cJ \"Net::Ping\" : \"2.41\",\cJ \"Plack\" : \"0\",\cJ \"Test::Exception\" : \"0\",\cJ \"Test::More\" : \"0\"\cJ }\cJ }\cJ },\cJ \"provides\" : {\cJ \"Hijk\" : {\cJ \"file\" : \"lib/Hijk.pm\",\cJ \"version\" : \"0.27\"\cJ }\cJ },\cJ \"release_status\" : \"stable\",\cJ \"resources\" : {\cJ \"repository\" : {\cJ \"type\" : \"git\",\cJ \"url\" : \"https://github.com/gugod/Hijk.git\",\cJ \"web\" : \"https://github.com/gugod/Hijk\"\cJ }\cJ },\cJ \"version\" : \"0.27\",\cJ \"x_serialization_backend\" : \"JSON::PP version 2.97001\",\cJ \"x_static_install\" : \"1\"\cJ}\cJ"
DB<25>
It would seem that correct way would be something along the lines of
if ($dist->is_generated($filename)) {
open my $fh, '> :raw', $filename or die "Could not generate $filename: $!";
print $fh Encode::encode 'UTF-8', $dist->{files}{$filename};
}
from app-modulebuildtiny.
I use mbtiny v 0.026 and this seems to be broken again.
from app-modulebuildtiny.
Apparently it was rather picky about wanting =encoding utf8
instead of =encoding utf-8
, which isn't intentional or useful. I'm guessing you ran into that.
I've just release 0.027 which fixes that (and also fixes an encoding issue in README generation)
from app-modulebuildtiny.
Related Issues (20)
- Support minting a distribution HOT 3
- Add --omit-core=$v option to listdeps HOT 1
- Multiple licenses HOT 6
- Meta data from .pod file HOT 7
- uninit value at App/ModuleBuildTiny.pm line 57 HOT 4
- Invalid links to helper scripts HOT 6
- Support running xt tests HOT 2
- Lack of $VERSION in .pm file gives cryptic error HOT 1
- mbtiny regenerate includes $DISTNAME-$VERSION.tar.gz in MANIFEST HOT 2
- Empty directory should be clearer about what is failing HOT 1
- Falls afoul the dreaded legacy + different version requirements => Wrong result HOT 2
- "Changes appears to be empty" ... not. HOT 2
- Can't call method "fulltext" on an undefined value HOT 4
- Symlink handling undefined, leads to Win32 unfriendly tars HOT 3
- Symlinks removed instead of followed HOT 1
- configure doesn't set up .pause file HOT 1
- Typo in `mbtiny dist --verbose` output HOT 1
- Cannot parse $VERSION from... in newly minted module HOT 2
- Optionally write out a config file HOT 3
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 app-modulebuildtiny.