简体   繁体   中英

How to use CPAN modules in Perl Mason?

I want to use a CPAN library. Where do I add this line use Data::UUID; in a Mason file?

In your file.pl which serves Mason requests.

#!/usr/local/bin/perl
use Mason;
use Data::UUID;
my $mason = Mason->new(comp_root => '...');
print $mason->run('/foo')->output;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM