Cees Hek wrote:
All you need to do is export a 'blog' method from your
MyApp::Plugin::Blog plugin. This can be done quite easily using the
Exporter module. Here is a quick example of what you would put in
your plugin:
I'd got this far, but what I was confused about is what is returned?
ie if I want to call:
$self->blog->getBlog($blogid);
where is getBlog created?
Paul
use strict;
use vars qw($VERSION @EXPORT @ISA);
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(blog);
sub blog {
blog blog blog
}
This all works through the 'import' method that is always called when
you 'use' a module. For more details on exporting functions, see the
docs for Exporter, as well as perlfunc and perlmod.
Cheers,
Cees
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]