feature request. skip codepoint of utf8 in quote()#12
Open
bokutin wants to merge 1 commit intogisle:masterfrom
Open
feature request. skip codepoint of utf8 in quote()#12bokutin wants to merge 1 commit intogisle:masterfrom
bokutin wants to merge 1 commit intogisle:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello.
I think to try a little better output of DBIx::Class::Schema::Loader.
It is used in the schema loader Data::Dump::dump() is.
https://github.com/dbsrgits/dbix-class-schema-loader/blob/master/lib/DBIx/Class/Schema/Loader/Base.pm#L2868
.pm file to be output contains the "use utf8" but, Perl Unicode strings would have been CODEPOINT of, it is ugly.
# lib/MyApp/Schema/Result/Lang.pm __PACKAGE__->add_columns( "lang", { data_type => "enum", extra => { custom_type_name => "lang_type", list => [ [ "\x{82F1}\x{8A9E}", "\x{65E5}\x{672C}\x{8A9E}", "\x{4E2D}\x{56FD}\x{8A9E}", ] ], }, is_nullable => 1, },Apply this patch, and $DO_NOT_CODEPOINT_TO_UTF8 =1. It is clean as this.
--- a/lib/MyApp/Schema/Result/Lang.pm +++ b/lib/MyApp/Schema/Result/Lang.pm @@ -23,11 +23,7 @@ __PACKAGE__->add_columns( data_type => "enum", extra => { custom_type_name => "lang_type", - list => [ - "\x{82F1}\x{8A9E}", - "\x{65E5}\x{672C}\x{8A9E}", - "\x{4E2D}\x{56FD}\x{8A9E}", - ], + list => ["英語", "日本語", "中国語"], }, is_nullable => 1, },I think it is good this flag was in the Data::Dump.
Could you please merge.
Cheers,
Tomohiro Hosaka