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/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.