Usually this means that the wrapper uses the underlying module to do all of the work but provides a different interface. For example DBIx::Simple uses DBI to do all of the actual database interaction but allows you to use its own simplified methods rather than directly using DBI methods. To get a list of columns from a statement handle in DBI, you'd need to do something like:
my @columns = @{$sth->{NAME}};
whereas in DBIx::Simple, you can just do:
my @columns = $result->columns;
If you look at the code for columns() method in DBIx::Simple, you will see that it actually does the DBI $sth->{NAME} call, but saves you the trouble of typing the more complex syntax.
| [reply] [d/l] [select] |
This looks more a non-naitive English speaker problem than a Perl problem, but . . . :)
Probably the simplest answer is to think of LWP::Simple and LWP::UserAgent. The former provides a "wrapper" interface (get, getstore) around the more feature-ful interface of the later. It hides what may be unnecessary details behind an easier to use interface that makes it simpler to use than if you had to write the more extensive code necessary to use the underlying module. If you don't need to get at the full API the wrapper can make it easier to get stuff done in less code.
Another common usage would be a module which imitates the API of another module to provide the same functionality by some other means. No good examples are coming to mind right offhand but someone may chime in with one later . . .
| [reply] [d/l] [select] |
This looks more a non-naitive English speaker problem than a Perl problem
Ouch... I was actually happy to see that someone had asked this question because I've always wondered what it meant, too. And I speak English pretty well. : )
I wonder, though, whether the remark about English would've come up had the OP's username been "Jim Smith."
Obviously within communities of experts there is no need to spell out exactly what is meant every time one throws about a phrase such as "Just create a simple frobnosticator..." But the great thing about PM is that it is home to practitioners of all levels, where experts interact with each other at the expert level while also generously sharing their expertise with beginners. And beginners know less than experts because we are beginners, not because we haven't mastered English. Someone could have an advanced degree in English literature and still need to ask what "a simple wrapper" means in this context.
| [reply] |
In addition to what Fletch said...
Sometimes we call wrappers such modules that provide Perl interface to libraries written in other languages. For example, the module XML::LibXML is Perl binding for libxml2. | [reply] |
It means that the module does the dirtier work of interacting with <another module> to provide a simpler API for you to interact with, not additional functionality.
There are often utilities that offer similar functionality, prove, a part of Test-Harness provides you with a command line wrapper around Test::Harness so you don't have to write your own run all tests script (though you could, if prove didn't have everything you wanted)
| [reply] |