X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2Fblog-0023.html-inc;fp=pages%2Fblog-0023.html-inc;h=06aca7502fd35aa8c157a1b354942766dceb4c24;hb=56d4907c407e8564b4a8a9d09e252573131fad3e;hp=8451d0cad9fffac62cf3d01e8ef56f55afa6d4fd;hpb=a8a21960f071bf93e73815cd9fe25b96d5c98cd0;p=sdlgit%2FSDL-Site.git diff --git a/pages/blog-0023.html-inc b/pages/blog-0023.html-inc index 8451d0c..06aca75 100644 --- a/pages/blog-0023.html-inc +++ b/pages/blog-0023.html-inc @@ -1,20 +1,40 @@

-Newbie Friendly Perl Projects +Design of SDL::Rect

-
A seed needs soft soil and water to grow
This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
-
-I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
-
  1. Look at SDL docs [link]
  2. -
  3. See where SDL_perl is using the same functions [link] and the docs to this file [link]
  4. -
  5. Use the pod format to add it to the source [link to using pod]
  6. -
  7. {BONUS} Come up with tutorial or cookbook [link to example]
  8. -
  9. Submit code to github [link] or email them to me [link]
    -
  10. -

-Basically assume nothing is known. I know this may seem demeaning but I am a newbie to Perl and sometimes I hate looking for crust (docs). I call it crust because a crust is useful for me to eat a pizza slice, but it has no flavor .
-
---yapgh -


-

\ No newline at end of file +

+you say things,
+I hear,
+but don't listen,
+
+you show things,
+I see,
+but don't understand,
+
+you write things,
+I read,
+but don't know.
+

+Lately we have been working on cleaning up the XS name spaces of SDL perl. After some bumps and falls we came up with a separated Rect module. Rect is one of the most simple C struct as shown below.
+
+
+
+Using the awesome perlobject.map as a reference I was able to create a blessed perl object in XS. So now SDL::Rect->new(...) gave us a blessed reference ready to go. And as an icing it would destroy itself properly no matter where it was used. But once I brought it into our existing code base, garu pointed out the extending it was a little bit of a mess. So far to extend Rect we have to something like below. Any comment or advice would be much appreciated.
+
+
+
+
+
+Have at it I am a big boy. You can grab the code like this.
+Only If you don't already have a local git repo:
+
+
mkdir SDL
+cd SDL
+git init .

+Then do this or skip to this if you already have a local git repo
+
git pull git://github.com/kthakore/SDL_perl.git experimental
+


+

\ No newline at end of file