Changeset fd8dfe7


Ignore:
Timestamp:
Jun 2, 2009, 11:53:14 AM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
8daf504
Parents:
ee183be
git-author:
Nelson Elhage <nelhage@mit.edu> (06/01/09 22:45:53)
git-committer:
Nelson Elhage <nelhage@mit.edu> (06/02/09 11:53:14)
Message:
Load perl code from the filesystem at runtime.

Remove perlwrap.pm and associated code, and instead do 'use BarnOwl'
at boot time to load cdoe from the file system at runtime. In
addition, add appropriate 'use' statements to the .pm files to cause
everything to get loaded.
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • Makefile.in

    rd5ef539 rfd8dfe7  
    3939BASE_OBJS = $(BASE_SRCS:.c=.o)
    4040
    41 GEN_C = varstubs.c perlglue.c perlwrap.c
     41GEN_C = varstubs.c perlglue.c
    4242GEN_H = owl_prototypes.h
    4343GEN_O = $(GEN_C:.c=.o)
     
    9797        perl stubgen.pl > varstubs.c
    9898
    99 perlwrap.c: perlwrap.pm encapsulate.pl
    100         perl encapsulate.pl perlwrap.pm owl_perlwrap_codebuff > perlwrap.c
    101 
    10299# Only move owl_prototypes.h into place if the new one is different
    103100owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS)
  • perl/lib/BarnOwl.pm

    ree183be rfd8dfe7  
    33
    44package BarnOwl;
     5
     6BEGIN {
     7# bootstrap in C bindings and glue
     8    *owl:: = \*BarnOwl::;
     9    bootstrap BarnOwl 1.2;
     10};
     11
     12use lib(get_data_dir() . "/lib");
     13use lib(get_config_dir() . "/lib");
     14
     15use BarnOwl::Hook;
     16use BarnOwl::Hooks;
     17use BarnOwl::Message;
     18use BarnOwl::Style;
     19use BarnOwl::Timer;
    520
    621=head1 NAME
     
    136151
    137152=cut
    138 
    139 
    140 BEGIN {
    141 # bootstrap in C bindings and glue
    142     *owl:: = \*BarnOwl::;
    143     bootstrap BarnOwl 1.2;
    144 };
    145 
    146 use lib(get_data_dir() . "/lib");
    147 use lib(get_config_dir() . "/lib");
    148153
    149154# perlconfig.c will set this to the value of the -c command-line
  • perl/lib/BarnOwl/Message.pm

    ree183be rfd8dfe7  
    33
    44package BarnOwl::Message;
     5
     6use BarnOwl::Message::Admin;
     7use BarnOwl::Message::AIM;
     8use BarnOwl::Message::Generic;
     9use BarnOwl::Message::Loopback;
     10use BarnOwl::Message::Zephyr;
    511
    612sub new {
  • perl/lib/BarnOwl/Style.pm

    ree183be rfd8dfe7  
    33
    44package BarnOwl::Style;
     5
     6use BarnOwl::Style::Basic;
     7use BarnOwl::Style::Default;
     8use BarnOwl::Style::Legacy;
     9use BarnOwl::Style::OneLine;
    510
    611# This takes a zephyr to be displayed and modifies it to be displayed
  • perlconfig.c

    r96b5c81 rfd8dfe7  
    99
    1010static const char fileIdent[] = "$Id$";
    11 
    12 extern char *owl_perlwrap_codebuff;
    1311
    1412extern XS(boot_BarnOwl);
     
    304302  char *err;
    305303  char *args[4] = {"", "-e", "0;", NULL};
     304  AV *inc;
     305  char *path;
    306306
    307307  /* create and initialize interpreter */
     
    348348  }
    349349
    350   eval_pv(owl_perlwrap_codebuff, FALSE);
     350  /* Add the system lib path to @INC */
     351  inc = get_av("INC", 0);
     352  path = owl_sprintf("%s/lib", owl_get_datadir());
     353  av_unshift(inc, 1);
     354  av_store(inc, 0, newSVpv(path, 0));
     355  owl_free(path);
     356
     357  eval_pv("use BarnOwl;", FALSE);
    351358
    352359  if (SvTRUE(ERRSV)) {
  • perlglue.xs

    r1631825 rfd8dfe7  
    1717         *************************************************************
    1818         * These functions, when they are intended to be user-visible,
    19          * are documented in perlwrap.pm. If you add functions to this
    20          * file, add the appropriate documentation there!
     19         * are documented in perl/lib/BarnOwl.pm. If you add functions
     20         * to this file, add the appropriate documentation there!
    2121         *
    2222         * If the function is simple enough, we simply define its
     
    2525         * simple version here that takes arguments in as flat a
    2626         * manner as possible, to simplify the XS code, put it in
    27          * BarnOwl::Intenal::, and write a perl wrapper in perlwrap.pm
     27         * BarnOwl::Intenal::, and write a perl wrapper in BarnOwl.pm
    2828         * that munges the arguments as appropriate and calls the
    2929         * internal version.
Note: See TracChangeset for help on using the changeset viewer.