Did you put the use in a different package? What the use identical to what you posted, or did it have a list (empty or otherwise)? Did you use require (which doesn't import) instead of use?
#!/usr/bin/perl use XML::Simple (); BEGIN { print(__PACKAGE__->can('XMLin') ? 1 : 0, "\n"); } # 0 use XML::Simple; BEGIN { print(__PACKAGE__->can('XMLin') ? 1 : 0, "\n"); } # 1 package Other; BEGIN { print(__PACKAGE__->can('XMLin') ? 1 : 0, "\n"); } # 0 use XML::Simple; BEGIN { print(__PACKAGE__->can('XMLin') ? 1 : 0, "\n"); } # 1 package YetOther; BEGIN { print(__PACKAGE__->can('XMLin') ? 1 : 0, "\n"); } # 0 use XML::Simple qw( XMLout ); BEGIN { print(__PACKAGE__->can('XMLin') ? 1 : 0, "\n"); } # 0 use XML::Simple qw( XMLin ); BEGIN { print(__PACKAGE__->can('XMLin') ? 1 : 0, "\n"); } # 1 package main; # Back to first package. BEGIN { print(__PACKAGE__->can('XMLin') ? 1 : 0, "\n"); } # 1
In reply to Re: Using the XMLin() method in XML::Simple not working
by ikegami
in thread Using the XMLin() method in XML::Simple not working
by heigold1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |