diff options
Diffstat (limited to 'docs/perl.md')
-rw-r--r-- | docs/perl.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/perl.md b/docs/perl.md new file mode 100644 index 0000000..eee6bbe --- /dev/null +++ b/docs/perl.md @@ -0,0 +1,21 @@ +Title: How to use libproxy in Perl +Slug: snippets + +# How to use libproxy in Perl + +``` +#!/usr/bin/perl +use warnings; +use Glib::Object::Introspection; +Glib::Object::Introspection->setup( + basename => 'Px', + version => '1.0', + package => 'Px'); + +my $pf = new Px::ProxyFactory; + +$proxies = $pf->get_proxies("https://github.com/libproxy/libproxy"); +foreach my $proxy (@$proxies) { + print $proxy."\n"; +} +``` |