NAME

OpenInteract2::App - Base class for CPAN-distributable OpenInteract application bundles

SYNOPSIS

# Install to perl an application from CPAN:

  # using CPAN.pm:
  $ perl -MCPAN -e 'install OpenInteract2::App::MyApp'

  # manually:
  $ tar -zxf OpenInteract2-App-MyApp-1.02.tar.gz
  $ cd OpenInteract2-App-MyApp-1.02/
  $ perl Makefile.PL
  $ make
  $ make install

# Install to website an application (aka package) from the command-line:
perl -MOpenInteract2::App::MyApp -e 'install( "/path/to/my_website" )'

# Same thing, but from the command-line using oi2_manage:
oi2_manage install_package --package_class=OpenInteract2::App::MyApp

# Programmatically:

# Instantiate an application object
my $app = OpenInteract2::App->new( 'myapp' )
              || die "No application 'myapp' installed";

# Display some information about the application
print "Application bundle info:\n",
      "Version:      ", $app->version, "\n",
      "Dependencies: ", join( ", ", $app->module_dependencies, "\n",
      "Authors:      ", join( ", ", $app->author_names ), "\n",
      "URL:          ", $app->url, "\n",
      "Has SQL DDL?  ", $app->has_sql_structures, "\n";

# Install the application
eval { $app->install( '/path/to/my_website' ) };
if ( $@ ) {
    die "Cannot install application: $@\n";
}
else {
    print "Application installed ok!";
}

DESCRIPTION

This is a base class for CPAN-distributable OpenInteract applications. Previously the only way to distribute and install an OpenInteract application was with a package bundled up into a zip file. This class and supporting tools provide a more standard means of distributing an application while taking advantage of all that CPAN has to offer.

CLASS METHODS

new( $app_name )

Create a new application object of type $app_name.

list_apps()

List all available applications installed on your system.

OBJECT METHODS

install( $website_dir )

Installs the application to $website_dir.

PROPERTIES

version

module_dependencies

author_names

author_emails

url

has_sql_structures

SEE ALSO

OpenInteract2::Brick

OpenInteract2::Manage::Package::CreateCPAN

COPYRIGHT

Copyright (c) 2005 Chris Winters. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Chris Winters <chris@cwinters.com>