Skip to content

Commit 876f676

Browse files
authored
Merge pull request NixOS#13060 from VitGottwald/patch-3
Fix perl example
2 parents 1554113 + 9f94a1b commit 876f676

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

doc/manual/source/command-ref/nix-shell.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,21 @@ print(t)
242242
```
243243

244244
Similarly, the following is a Perl script that specifies that it
245-
requires Perl and the `HTML::TokeParser::Simple` and `LWP` packages:
245+
requires Perl and the `HTML::TokeParser::Simple`, `LWP` and
246+
`LWP::Protocol::Https` packages:
246247

247248
```perl
248249
#! /usr/bin/env nix-shell
249-
#! nix-shell -i perl --packages perl perlPackages.HTMLTokeParserSimple perlPackages.LWP
250+
#! nix-shell -i perl
251+
#! nix-shell --packages perl
252+
#! nix-shell --packages perlPackages.HTMLTokeParserSimple
253+
#! nix-shell --packages perlPackages.LWP
254+
#! nix-shell --packages perlPackages.LWPProtocolHttps
250255

251256
use HTML::TokeParser::Simple;
252257

253258
# Fetch nixos.org and print all hrefs.
254-
my $p = HTML::TokeParser::Simple->new(url => 'http://nixos.org/');
259+
my $p = HTML::TokeParser::Simple->new(url => 'https://nixos.org/');
255260

256261
while (my $token = $p->get_tag("a")) {
257262
my $href = $token->get_attr("href");

0 commit comments

Comments
 (0)