Rectangle 27 0

Perl, Can't locate PacketUDPSyslog.pm in @INC | custom modules?


package Packet;
package Syslog;
package UDP;
use Packet::Syslog::UDP;
use Packet;
use Syslog;
use UDP;

If so, you need to load each one of them separately using

Oh, and BTW, if this is up to you, I'd strongly recommend using a company or project specific module name-space. So instead of 'Packet.pm' I'd create a file called 'Company/Packet.pm' which would have package Company::Packet; at the top and I'd load it with use Company::Packet; Otherwise you'll easily bump into modules with the same name.

On the other hand, if you have one file in Packet/Syslog/UDP.pm then it has to have package Packet::Syslog::UDP; at the top and you'd load it using

Some articles that might shed more light on the subject:

Note
Rectangle 27 0

Perl, Can't locate PacketUDPSyslog.pm in @INC | custom modules?


package Packet;
package Syslog;
package UDP;
use Packet::Syslog::UDP;
use Packet;
use Syslog;
use UDP;

If so, you need to load each one of them separately using

Oh, and BTW, if this is up to you, I'd strongly recommend using a company or project specific module name-space. So instead of 'Packet.pm' I'd create a file called 'Company/Packet.pm' which would have package Company::Packet; at the top and I'd load it with use Company::Packet; Otherwise you'll easily bump into modules with the same name.

On the other hand, if you have one file in Packet/Syslog/UDP.pm then it has to have package Packet::Syslog::UDP; at the top and you'd load it using

Some articles that might shed more light on the subject:

Note