Skip to content

Instantly share code, notes, and snippets.

@sirrobert
Created September 17, 2012 16:06
Show Gist options
  • Save sirrobert/3738213 to your computer and use it in GitHub Desktop.
Save sirrobert/3738213 to your computer and use it in GitHub Desktop.
Config::INI::parse_file can't be found after a 'require'.
[one]
two=three
four=five
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
# 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