Pugs - Perl 5 Compatibility

Perl 5 Compatibility

As of version 6.2.6, Pugs also has the ability to embed Perl 5 and use CPAN modules installed on the system. The example below demonstrates the use of the popular Perl DBI module to manage a database:

#!/usr/bin/pugs use v6; use perl5:DBI; my $dbh = DBI.connect('dbi:SQLite:dbname=test.db'); $dbh.do("CREATE TABLE Test (Project, Pumpking)"); my $sth = $dbh.prepare("INSERT INTO Test VALUES (?, ?)"); $sth.execute(); $sth.execute(); $sth.execute(); my $res = $dbh.selectall_hashref('SELECT * FROM Test', 'Pumpking'); # Just another Pugs hacker say "Just another $res hacker";

Read more about this topic:  Pugs