---
name: "Apache2::ModBT"
section: "3pm"
platform: "linux"
package: "libapache2-modbt-perl"
version: "0.0.19+p4.2296-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/Apache2::ModBT"
---

# Apache2::ModBT(3pm)

mod\_perl interface to mod\_bt

## NAME

Apache2::ModBT - mod\_perl interface to mod\_bt

## SYNOPSIS

```
  use Apache2::ModBT;
```

```
  sub handler
  {
   my $r = shift;
   my $tracker = $r->server->ModBT_Tracker();
   print $tracker->num_peers, "\n";
   foreach my $i ($tracker->Infohashes())
   {
        ...
   }
  }
```

## DESCRIPTION

This is a pole for perl.

The Apache2::ModBT module adds a method onto the Apache::Server object which returns the LibBTT Tracker object for the current mod\_bt process. When manipulating a mod\_bt tracker from within Apache2, you should use this method instead of calling Net::BitTorrent::LibBTT-\>*new()*.

- $r-\>server-\>*ModBT\_Tracker()*

  Returns a tracker object that corresponds to the mod\_bt tracker instance running on the current apache process. If the tracker is not enabled ("Tracker On" is not set in httpd.conf), this will return `"undef"`.

## SEE ALSO

Net::BitTorrent::LibBTT, \<http://www.crackerjack.net/mod\_bt/\>, \<http://perl.apache.org/\>

## AUTHOR

Tyler 'Crackerjack' MacDonald, \<tyler@yi.org\>

## COPYRIGHT AND LICENSE

Copyright (C) 2006 by Tyler 'Crackerjack' MacDonald

This library is free software; you can redistribute it and/or modify it under the terms of the Apache License 2.x (\<http://www.apache.org/licenses/LICENSE-2.0\>).
