/[VRac]/Prefs.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /Prefs.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 89 - (hide annotations)
Thu Aug 2 12:01:09 2007 UTC (16 years, 7 months ago) by dpavlin
Original Path: M6502/Prefs.pm
File size: 697 byte(s)
Remove all traces of older attempt to embed perl into CPU emulation module
and move forward to just using it via XS bindings
1 dpavlin 56 package Prefs;
2    
3     # Dobrica Pavlinusic, <dpavlin@rot13.org> 07/31/07 16:31:41 CEST
4    
5     use strict;
6     use warnings;
7    
8     use Carp qw/cluck/;
9     use Data::Dump qw/dump/;
10    
11     use base qw(Class::Accessor);
12     # Screen
13     my @names = qw(scale show_mem);
14     # Orao
15     push @names, qw(debug trace);
16 dpavlin 89 warn "# Prefs names defined: ",join(",",@names),"\n";
17 dpavlin 56 __PACKAGE__->mk_accessors(@names);
18    
19     =head1 Preferences
20    
21     =head2 names
22    
23     @names = Prefs->names;
24    
25     =cut
26    
27     sub names { return @names };
28    
29     =head2 prefs;
30    
31     print prefs( Prefs->dump );
32    
33     =cut
34    
35     sub prefs {
36     my $self = shift || die "no self?";
37     my $prefs;
38     foreach my $p ( @names ) {
39     $prefs->{$p} = $self->$p;
40     }
41    
42     warn "## prefs = ",dump( $prefs ) if $self->debug;
43     return $prefs;
44     }
45    
46    
47     1;

  ViewVC Help
Powered by ViewVC 1.1.26