You need to ask for a copy of blib

Here is how it works

Save this module as SOso-0.01.patch.txt

diff -ruN empty/lib/SOso.pm SOso-0.01/lib/SOso.pm --- empty/lib/SOso.pm 1969-12-31 16:00:00.000000000 -0800 +++ SOso-0.01/lib/SOso.pm 2011-08-19 19:28:36.000000000 -0700 @@ -0,0 +1,11 @@ +package SOso; + +use strict; +use warnings; + +our $VERSION = '0.01'; + +require XSLoader; +XSLoader::load('SOso', $VERSION); + +1; diff -ruN empty/Makefile.PL SOso-0.01/Makefile.PL --- empty/Makefile.PL 1969-12-31 16:00:00.000000000 -0800 +++ SOso-0.01/Makefile.PL 2011-08-19 19:32:42.843750000 -0700 @@ -0,0 +1,5 @@ +use ExtUtils::MakeMaker; +WriteMakefile( + NAME => 'SOso', + VERSION_FROM => 'lib/SOso.pm', # finds $VERSION +); diff -ruN empty/MANIFEST SOso-0.01/MANIFEST --- empty/MANIFEST 1969-12-31 16:00:00.000000000 -0800 +++ SOso-0.01/MANIFEST 2011-08-19 19:32:23.609375000 -0700 @@ -0,0 +1,5 @@ +lib/SOso.pm +Makefile.PL +MANIFEST +SOso.xs +t/SOso.t \ No newline at end of file diff -ruN empty/SOso.xs SOso-0.01/SOso.xs --- empty/SOso.xs 1969-12-31 16:00:00.000000000 -0800 +++ SOso-0.01/SOso.xs 2011-08-19 19:30:12.000000000 -0700 @@ -0,0 +1,8 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +MODULE = SOso PACKAGE = SOso + +PROTOTYPES: DISABLE + diff -ruN empty/t/SOso.t SOso-0.01/t/SOso.t --- empty/t/SOso.t 1969-12-31 16:00:00.000000000 -0800 +++ SOso-0.01/t/SOso.t 2011-08-19 19:29:00.000000000 -0700 @@ -0,0 +1,4 @@ +use strict; +use warnings; +use Test::More tests => 1; +BEGIN { use_ok('SOso') };

Create this module

md SOso-0.01 cd SOso-0.01 patch -p1 < ../SOso-0.01.patch.txt

Build the module perl Makefile.PL && make test and you'll get

$ tree -f blib blib |-- blib/arch | `-- blib/arch/auto | `-- blib/arch/auto/SOso | |-- blib/arch/auto/SOso/SOso.bs | `-- blib/arch/auto/SOso/SOso.dll |-- blib/bin |-- blib/lib | |-- blib/lib/SOso.pm | `-- blib/lib/auto | `-- blib/lib/auto/SOso |-- blib/man1 |-- blib/man3 `-- blib/script

Now to install blib without Makefile you use

 

This question crossposted at http://stackoverflow.com/questions/7113320/where-to-find-the-perl-shared-objects-directory


In reply to Re: Using a shared object in perl by Anonymous Monk
in thread Using a shared object in perl by sherab

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.