Created
September 17, 2012 16:06
-
-
Save sirrobert/3738213 to your computer and use it in GitHub Desktop.
Config::INI::parse_file can't be found after a 'require'.
This file contains 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
[one] | |
two=three | |
four=five |
This file contains 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
use v6; | |
use lib '.'; | |
use Config::INI; | |
# Notice that it doesn't hurt to call Config::INI::parse_file(...) multiple | |
# times ... | |
say Config::INI::parse_file('./config.txt'); | |
say Config::INI::parse_file('./config.txt'); | |
# ... until you try to require module! Then Config::INI::&parse_file can't | |
# be found! | |
require 'Loader'; | |
say Config::INI::parse_file('./config.txt'); | |
## | |
# OUTPUT: | |
## | |
# ("one" => {"two" => "three", "four" => "five"}).hash | |
# ("one" => {"two" => "three", "four" => "five"}).hash | |
# Could not find symbol 'Config::INI::&parse_file' | |
# in block <anon> at test.p6:15 |
This file contains 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
# Just a placeholder so we can require a file. You can put "class Loader;" in here if you want... it still breaks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment