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
Note that you don’t have to use from-import to get into trouble: | |
# module Y | |
import X | |
X.spam() # doesn't work either: spam isn't defined yet! | |
To fix this, either refactor your program to avoid circular imports (moving stuff to a separate module often helps), or move the imports to the end of the module (in this case, if you move import Y to the end of module X, everything will work just fine). |
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
Note that you don’t have to use from-import to get into trouble: | |
# module Y | |
import X | |
X.spam() # doesn't work either: spam isn't defined yet! | |
To fix this, either refactor your program to avoid circular imports (moving stuff to a | |
separate module often helps), or move the imports to the end of the module (in this |
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
> cat yamlxs-tt2-utf8.t | |
use strict; | |
use warnings; | |
use Test::More tests => 1; | |
use Template::Toolkit::Simple; | |
use YAML::XS; | |
my $template = <<'...'; | |
Hello, [% name %] | |
... |
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
> cat yamlxs-tt2-utf8.t | |
use strict; | |
use warnings; | |
use Test::More tests => 2; | |
use Template::Toolkit::Simple; | |
use YAML::XS; | |
use Encode; | |
my $template = <<'...'; | |
Hello, [% name %] |
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
> cat yamlxs-tt2-utf8.t | |
use strict; | |
use warnings; | |
use Test::More tests => 2; | |
use Template::Toolkit::Simple; | |
use YAML::XS; | |
use Encode; | |
my $template = <<'...'; | |
Hello, [% name %] |
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
> cat yamlxs-tt2-utf8b.t | |
use strict; | |
use warnings; | |
use Test::More tests => 8; | |
use Template::Toolkit::Simple; | |
use YAML::XS; | |
use Encode; | |
my $template = <<'...'; | |
Hello, [% name %] |
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
=head1 USING YAML::XS WITH UNICODE | |
Handling unicode properly in Perl can be a pain. YAML::XS only deals | |
with streams of utf8 octets. Just remember this: | |
$perl = Load($utf8_octets); | |
$utf8_octets = Dump($perl); | |
There are many, many places where things can go wrong with unicode. | |
If you are having problems, use Devel::Peek on all the possible |
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
diff --git a/Makefile.PL b/Makefile.PL | |
index 17ed88e..0326a72 100644 | |
--- a/Makefile.PL | |
+++ b/Makefile.PL | |
@@ -141,6 +141,7 @@ EOT | |
clean_files q{ | |
lib/Mouse/Tiny.pm $(O_FILES) test-mydeps-*.log | |
+ xshelper.h | |
*.out |
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
_________________________________________ | |
/ i'm 'thinging' that i need to get in \ | |
| touch with you as soon as i'm done with | | |
\ this thing. i miss you. / | |
----------------------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || |
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
_________________________________________ | |
/ i'm 'thinging' that i need to get in \ | |
| touch with you as soon as i'm done with | | |
\ this thing. i miss you. / | |
----------------------------------------- | |
\ ^__^ | |
\ (@@)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || |