【发布时间】:2012-08-30 09:46:19
【问题描述】:
我正在使用Mac::PropertyList 模块来读取plist 兼容的XML 文件。函数plist_as_perl() 在“unblessed perl data structure"”中返回plist/XML 文件内容。这是我卡住的地方,因为我不知道如何访问其中包含的数据。
这是程序
use Mac::PropertyList;
print "\nbefore parsing the plist ...";
my $data = Mac::PropertyList::parse_plist_file("abc.xml");
my $pvar = Mac::PropertyList::plist_as_perl($data);
现在如何使用 pvar?
谢谢
【问题讨论】:
-
创建 $pvar 为
$pvar = $data->as_perl;(见下文)