Enlightenment CVS committal

Author  : leviathan
Project : e17
Module  : proto

Dir     : e17/proto/etk-perl/lib


Modified Files:
        Etk.pm 


Log Message:
- todo--
- some more simplifactions and cleanups
- start of test suite

===================================================================
RCS file: /cvs/e/e17/proto/etk-perl/lib/Etk.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- Etk.pm      15 Jul 2006 19:19:05 -0000      1.6
+++ Etk.pm      17 Jul 2006 23:26:17 -0000      1.7
@@ -5,30 +5,11 @@
 use warnings;
 use Carp;
 
-require Exporter;
-use AutoLoader;
-
-our @ISA = qw(Exporter);
-
 use Etk::Main;
 use Etk::Window;
 
-# Items to export into callers namespace by default. Note: do not export
-# names by default without a very good reason. Use EXPORT_OK instead.
-# Do not simply export all your public functions/methods/constants.
-
-# This allows declaration      use Etk ':all';
-# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
-# will save memory.
-our %EXPORT_TAGS = ( 'all' => [ qw() ] );
-
-our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
-
-our @EXPORT = qw( );
-
 our $VERSION = '0.01';
 
-
 sub Init
 {
     Etk::etk_init();
@@ -39,29 +20,6 @@
     Etk::etk_shutdown();
 }
 
-sub AUTOLOAD {
-    # This AUTOLOAD is used to 'autoload' constants from the constant()
-    # XS function.
-
-    my $constname;
-    our $AUTOLOAD;
-    ($constname = $AUTOLOAD) =~ s/.*:://;
-    croak "&Etk::constant not defined" if $constname eq 'constant';
-    my ($error, $val) = constant($constname);
-    if ($error) { croak $error; }
-    {
-       no strict 'refs';
-       # Fixed between 5.005_53 and 5.005_61
-#XXX   if ($] >= 5.00561) {
-#XXX       *$AUTOLOAD = sub () { $val };
-#XXX   }
-#XXX   else {
-           *$AUTOLOAD = sub { $val };
-#XXX   }
-    }
-    goto &$AUTOLOAD;
-}
-
 require XSLoader;
 XSLoader::load('Etk', $VERSION);
 
@@ -73,13 +31,9 @@
        Etk::Shutdown();
 }
 
-# Preloaded methods go here.
-
-# Autoload methods go after =cut, and are processed by the autosplit program.
 
 1;
 __END__
-# Below is stub documentation for your module. You'd better edit it!
 
 =head1 NAME
 
@@ -87,20 +41,27 @@
 
 =head1 SYNOPSIS
 
-use Etk;
+  use Etk;
 
-my $win = Etk::Window->new();
-my $button = Etk::Button->new("Click me!");
+  my $win = Etk::Window->new();
+  my $button = Etk::Button->new("Click me!");
 
-$win->Add($button);
-$win->ShowAll();
+  # or
 
-$button->SignalConnect("clicked", \&clicked_cb);
+  my $win = Etk::Window->new();
+  my $button = $win->AddButton("Click me!");
+
+
+  $win->Add($button);
+  $win->ShowAll();
+
+  $button->SignalConnect("clicked", \&clicked_cb);
+
+  sub clicked_cb
+  {
+     print "button clicked!\n";
+  }
 
-sub clicked_cb
-{
-   print "button clicked!\n";
-}
 
 =head1 DESCRIPTION
 



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to