perl modules

jam at tigger.ws jam at tigger.ws
Thu May 23 12:26:53 UTC 2019


Ryan answered someone asking how to install modules. I read but am confused.
Help please:

[haycorn] /Users/jam/DEVEL [612]% sudo port install p5-dbd-mysql
--->  Computing dependencies for p5-dbd-mysql
--->  Cleaning p5-dbd-mysql
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.

[haycorn] /Users/jam/DEVEL [613]% perl -e "use dbd::mysql"
Can't locate dbd/mysql.pm in @INC (you may need to install the dbd::mysql module) (@INC contains: /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

Of course I can find them

[haycorn] /Users/jam [500]% find /opt/local/lib/perl5 -name '*mysql*'
/opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level/Bundle/DBD/mysql.pm
/opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level/DBD/mysql
/opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level/DBD/mysql.pm
/opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level/auto/DBD/mysql
/opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
/opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/Bundle/DBD/mysql.pm
/opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/DBD/mysql
/opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/DBD/mysql.pm
/opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/auto/DBD/mysql
/opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle

but how do Ijoin the dots (have perl look in the right place) the obvious does not work

[haycorn] /Users/jam/DEVEL [614]% perl -i /Users/jam/.cpan/Metadata -e "use dbd::mysql"
Unrecognized character \x05; marked by <-- HERE after pst0<-- HERE near column 5 at /Users/jam/.cpan/Metadata line 1.

or in the system place

[haycorn] /Users/jam/DEVEL [619]% perl -i /opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level/DBD/mysql.pm -e "use dbd::mysql"
Name "DBD::mysql::QUIET" used only once: possible typo at /opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level/DBD/mysql.pm line 407.
Name "DBD::mysql::GetInfo::info" used only once: possible typo at /opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level/DBD/mysql.pm line 829.

James


More information about the macports-users mailing list